]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: HUBP/HUBBUB register programming fixes
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Mon, 22 Jul 2019 18:12:25 +0000 (14:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Aug 2019 15:55:29 +0000 (10:55 -0500)
[Why]
- Need to change interface function signature / add an enum
  to reflect the available register field values

[How]
- Add a new enum and modify existing functions to use it instead
  of bool

Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h

index 03f5aa10c4c47fbbf0422a86a744555db8af78c6..001db49e4bb237deb6f9c7fc6cd807a62853b048 100644 (file)
@@ -509,7 +509,7 @@ bool hubp1_program_surface_flip_and_addr(
 }
 
 void hubp1_dcc_control(struct hubp *hubp, bool enable,
-               bool independent_64b_blks)
+               enum hubp_ind_block_size independent_64b_blks)
 {
        uint32_t dcc_en = enable ? 1 : 0;
        uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0;
index 91116b3d4b48443958008a71e2d9dfa671197444..cb20d10288c0be8ce915b7684e490917e007e701 100644 (file)
@@ -698,7 +698,7 @@ void hubp1_program_tiling(
 
 void hubp1_dcc_control(struct hubp *hubp,
                bool enable,
-               bool independent_64b_blks);
+               enum hubp_ind_block_size independent_64b_blks);
 
 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
 bool hubp1_program_surface_flip_and_addr(
index ac01e636ae27a208b83d511b45b83329905bed05..b4b384c7fa9bf832664799400c6189536b545ab2 100644 (file)
@@ -397,7 +397,7 @@ void hubp2_program_rotation(
 }
 
 void hubp2_dcc_control(struct hubp *hubp, bool enable,
-               bool independent_64b_blks)
+               enum hubp_ind_block_size independent_64b_blks)
 {
        uint32_t dcc_en = enable ? 1 : 0;
        uint32_t dcc_ind_64b_blk = independent_64b_blks ? 1 : 0;
index 924699e5f443f06eada734513844f8f5b8861730..c4ed8f1b9424bb6a66155127a9bba135cd5a8332 100644 (file)
@@ -252,7 +252,7 @@ bool hubp2_program_surface_flip_and_addr(
        bool flip_immediate);
 
 void hubp2_dcc_control(struct hubp *hubp, bool enable,
-               bool independent_64b_blks);
+               enum hubp_ind_block_size independent_64b_blks);
 
 void hubp2_program_size(
        struct hubp *hubp,
index 4993f134e747520ecca3a0d99e96ad820e0af01e..809b62b51a43620217bca68227d541d14dfddae5 100644 (file)
@@ -47,6 +47,11 @@ enum cursor_lines_per_chunk {
        CURSOR_LINE_PER_CHUNK_16
 };
 
+enum hubp_ind_block_size {
+       hubp_ind_block_unconstrained = 0,
+       hubp_ind_block_64b,
+};
+
 struct hubp {
        const struct hubp_funcs *funcs;
        struct dc_context *ctx;
@@ -74,7 +79,8 @@ struct hubp_funcs {
                        struct _vcs_dpi_display_ttu_regs_st *ttu_regs);
 
        void (*dcc_control)(struct hubp *hubp, bool enable,
-                       bool independent_64b_blks);
+                       enum hubp_ind_block_size blk_size);
+
        void (*mem_program_viewport)(
                        struct hubp *hubp,
                        const struct rect *viewport,