]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: remove legacy fields of dc_plane_cap struct
authorDavid Tadokoro <davidbtadokoro@usp.br>
Tue, 7 Mar 2023 22:53:41 +0000 (19:53 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Mar 2023 19:05:31 +0000 (14:05 -0500)
The fields blends_with_above and blends_with_below of struct
dc_plane_cap (defined in dc/dc.h) are boolean and set to true by
default. All instances of a dc_plane_cap maintain the default values of
both. Also, there is only one if statement that checks those fields and
there would be the same effect if it was deleted (assuming that those
fields are always going to be true).

For this reason, considering both fields as legacy ones, this commit
removes them and the aforementioned if statement.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: David Tadokoro <davidbtadokoro@usp.br>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
17 files changed:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c

index 6db59972ae27c649d81b88a3ce1ec9a85f061dc8..4458e00f5b154a42977c796f0b6a5af1c8b0f8c7 100644 (file)
@@ -4351,9 +4351,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
                if (plane->type != DC_PLANE_TYPE_DCN_UNIVERSAL)
                        continue;
 
-               if (!plane->blends_with_above || !plane->blends_with_below)
-                       continue;
-
                if (!plane->pixel_format_support.argb8888)
                        continue;
 
index f0a1934ebf8c441ba35292e34db60808ba7603a0..ccc27d4826400dc9987fcbd9c61a8d4caa9e5815 100644 (file)
@@ -82,8 +82,6 @@ enum det_size {
 
 struct dc_plane_cap {
        enum dc_plane_type type;
-       uint32_t blends_with_above : 1;
-       uint32_t blends_with_below : 1;
        uint32_t per_pixel_alpha : 1;
        struct {
                uint32_t argb8888 : 1;
index f808315b2835540d8bb45b116cd3ee0879f7bf7e..a4a45a6ce61e4658fdb3f39b049abcd936221c1d 100644 (file)
@@ -401,8 +401,6 @@ static const struct resource_caps stoney_resource_cap = {
 
 static const struct dc_plane_cap plane_cap = {
                .type = DC_PLANE_TYPE_DCE_RGB,
-               .blends_with_below = true,
-               .blends_with_above = true,
                .per_pixel_alpha = 1,
 
                .pixel_format_support = {
@@ -428,7 +426,6 @@ static const struct dc_plane_cap plane_cap = {
 
 static const struct dc_plane_cap underlay_plane_cap = {
                .type = DC_PLANE_TYPE_DCE_UNDERLAY,
-               .blends_with_above = true,
                .per_pixel_alpha = 1,
 
                .pixel_format_support = {
index 6bfac8088ab0a1dc8ce86be856d7a8fe248f07c5..2bb8e11f26e0b101ae8dabb5aaaa110f3b8976ca 100644 (file)
@@ -504,8 +504,6 @@ static const struct resource_caps rv2_res_cap = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index 3af24ef9cb2de9db9b499afccce844a12c059e94..00668df0938e9a8b9a43dfb1a58463577c9ae5ae 100644 (file)
@@ -670,8 +670,6 @@ static const struct resource_caps res_cap_nv10 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index cd46701398d9dee9b0418df9cee972e58d2001f5..6ea70da28aaaf529ccb5406257b6834c470f8dda 100644 (file)
@@ -571,8 +571,6 @@ static const struct resource_caps res_cap_dnc201 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index c10ff621cb1d9100dd1238d94ba95973a250b70d..19aaa557b2db009ffcf39c4ea935e261f2657223 100644 (file)
@@ -609,8 +609,6 @@ static const struct resource_caps res_cap_rn_FPGA_2pipe_dsc = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index b5b5320c7befb3e877a4c072f5791deaec3bec64..d60c17d5a0d85ce30d8062550422770d3938833a 100644 (file)
@@ -680,8 +680,6 @@ static const struct resource_caps res_cap_dcn3 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index ee62ae3eb98f655caa26daeb12530f1cb00411f6..b93b4498dba4d36336d5631a1067d69a88d99f2c 100644 (file)
@@ -651,8 +651,6 @@ static struct resource_caps res_cap_dcn301 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index 03ddf4f5f065c378deaa7dac3b8bc783f2a103ac..6ccad53f1e4942a838c6ad4caa3e433b14cb3258 100644 (file)
@@ -147,8 +147,6 @@ static const struct resource_caps res_cap_dcn302 = {
 
 static const struct dc_plane_cap plane_cap = {
                .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-               .blends_with_above = true,
-               .blends_with_below = true,
                .per_pixel_alpha = true,
                .pixel_format_support = {
                                .argb8888 = true,
index 727f458f6ee95f4ba389ef47b25345931c296f70..5c28f7151d138f2902801e67ae8090afc0700d4d 100644 (file)
@@ -126,8 +126,6 @@ static const struct resource_caps res_cap_dcn303 = {
 
 static const struct dc_plane_cap plane_cap = {
                .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-               .blends_with_above = true,
-               .blends_with_below = true,
                .per_pixel_alpha = true,
                .pixel_format_support = {
                                .argb8888 = true,
index d3918a10773a3e3060ac8acc487cfcdc494945e9..eaaa2e01f6d05fa7a0eb8c35defa66699f2bd03a 100644 (file)
@@ -827,8 +827,6 @@ static const struct resource_caps res_cap_dcn31 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index f9dfbc7407eeef5dac131cb65684d52f5c72db5b..50ed7e09d5ba4cf9ffbcce3edfa1a5217533c8fc 100644 (file)
@@ -855,8 +855,6 @@ static const struct resource_caps res_cap_dcn314 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index 7887078c5f64cd1d53c225d40f7037e3265477a9..41c972c8eb19816fd4cf496e691750dc741b7259 100644 (file)
@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index dc0b495062755602928950c4891ece60c2a97dc3..9ead347a33e93846ba523d520779f1e181aa8289 100644 (file)
@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index 87f7669e81d7028f19ed40fc13675fe0c9d8dcb1..100b6df33b33ef0cb6ba5cb6995238f759f23550 100644 (file)
@@ -657,8 +657,6 @@ static const struct resource_caps res_cap_dcn32 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {
index deaa4769be104e53db34ce3feee0ebd4c6a2a042..0f477d50e935961374ab118ffb0500e2c16550a5 100644 (file)
@@ -655,8 +655,6 @@ static const struct resource_caps res_cap_dcn321 = {
 
 static const struct dc_plane_cap plane_cap = {
        .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
-       .blends_with_above = true,
-       .blends_with_below = true,
        .per_pixel_alpha = true,
 
        .pixel_format_support = {