drm/i915/dsi: use compressed pixel format with DSC
authorJani Nikula <jani.nikula@intel.com>
Tue, 10 Dec 2019 10:50:57 +0000 (12:50 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Dec 2019 06:16:16 +0000 (08:16 +0200)
When compression is enabled, configure the DSI transcoder to use
compressed format.

Suggested-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0e58022ce5425560b3b31062c41de385a736c8b1.1575974743.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c

index 5149a28a874b3524cabfd4d955b2d475e8b2d38d..46075991370853a5bda9e2d40cc84ed3e4a955fa 100644 (file)
@@ -682,22 +682,26 @@ gen11_dsi_configure_transcoder(struct intel_encoder *encoder,
 
                /* select pixel format */
                tmp &= ~PIX_FMT_MASK;
-               switch (intel_dsi->pixel_format) {
-               default:
-                       MISSING_CASE(intel_dsi->pixel_format);
-                       /* fallthrough */
-               case MIPI_DSI_FMT_RGB565:
-                       tmp |= PIX_FMT_RGB565;
-                       break;
-               case MIPI_DSI_FMT_RGB666_PACKED:
-                       tmp |= PIX_FMT_RGB666_PACKED;
-                       break;
-               case MIPI_DSI_FMT_RGB666:
-                       tmp |= PIX_FMT_RGB666_LOOSE;
-                       break;
-               case MIPI_DSI_FMT_RGB888:
-                       tmp |= PIX_FMT_RGB888;
-                       break;
+               if (pipe_config->dsc.compression_enable) {
+                       tmp |= PIX_FMT_COMPRESSED;
+               } else {
+                       switch (intel_dsi->pixel_format) {
+                       default:
+                               MISSING_CASE(intel_dsi->pixel_format);
+                               /* fallthrough */
+                       case MIPI_DSI_FMT_RGB565:
+                               tmp |= PIX_FMT_RGB565;
+                               break;
+                       case MIPI_DSI_FMT_RGB666_PACKED:
+                               tmp |= PIX_FMT_RGB666_PACKED;
+                               break;
+                       case MIPI_DSI_FMT_RGB666:
+                               tmp |= PIX_FMT_RGB666_LOOSE;
+                               break;
+                       case MIPI_DSI_FMT_RGB888:
+                               tmp |= PIX_FMT_RGB888;
+                               break;
+                       }
                }
 
                if (INTEL_GEN(dev_priv) >= 12) {