]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Build DSC without DCN config
authorHarry Wentland <harry.wentland@amd.com>
Mon, 13 Feb 2023 20:29:06 +0000 (15:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Mar 2023 19:22:40 +0000 (14:22 -0500)
[Why & How]
DSC needs DCN but we are trying reduce the usage of the
DCN flag. It's easier to build the DSC code sprinkled
around DC core and the DMs and just guard the place where
DSC uses floating point code.

Since DSC is never enabled on non-DCN ASICs this won't
have any effect.

Reviewed-by: Hamza Mahfooz <Hamza.Mahfooz@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/Makefile
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c

index ba75e91ef62bc8478d94123d4423f831213f1d16..d2b1e824eeaa1d83e603029fadf5b87db50b9432 100644 (file)
 #
 # Makefile for Display Core (dc) component.
 
-DC_LIBS = basics bios dml clk_mgr dce gpio irq link virtual
+DC_LIBS = basics bios dml clk_mgr dce gpio irq link virtual dsc
 
 ifdef CONFIG_DRM_AMD_DC_DCN
 
 KCOV_INSTRUMENT := n
 
 DC_LIBS += dcn20
-DC_LIBS += dsc
 DC_LIBS += dcn10
 DC_LIBS += dcn21
 DC_LIBS += dcn201
index e97cf09be9d51955eb7a64a6ec91a2aa363b8917..3215ca4d57991525b1a6513768b1976ce8331719 100644 (file)
@@ -39,6 +39,7 @@
  */
 void calc_rc_params(struct rc_params *rc, const struct drm_dsc_config *pps)
 {
+#if defined(CONFIG_DRM_AMD_DC_DCN)
        enum colour_mode mode;
        enum bits_per_comp bpc;
        bool is_navite_422_or_420;
@@ -59,4 +60,5 @@ void calc_rc_params(struct rc_params *rc, const struct drm_dsc_config *pps)
                           slice_width, slice_height,
                           pps->dsc_version_minor);
        DC_FP_END();
+#endif
 }