Commit c0a76ae8 authored by David Tadokoro's avatar David Tadokoro Committed by Alex Deucher

drm/amd/display: remove legacy fields of dc_plane_cap struct

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: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarDavid Tadokoro <davidbtadokoro@usp.br>
Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 83923cb2
...@@ -4351,9 +4351,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) ...@@ -4351,9 +4351,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
if (plane->type != DC_PLANE_TYPE_DCN_UNIVERSAL) if (plane->type != DC_PLANE_TYPE_DCN_UNIVERSAL)
continue; continue;
if (!plane->blends_with_above || !plane->blends_with_below)
continue;
if (!plane->pixel_format_support.argb8888) if (!plane->pixel_format_support.argb8888)
continue; continue;
......
...@@ -82,8 +82,6 @@ enum det_size { ...@@ -82,8 +82,6 @@ enum det_size {
struct dc_plane_cap { struct dc_plane_cap {
enum dc_plane_type type; enum dc_plane_type type;
uint32_t blends_with_above : 1;
uint32_t blends_with_below : 1;
uint32_t per_pixel_alpha : 1; uint32_t per_pixel_alpha : 1;
struct { struct {
uint32_t argb8888 : 1; uint32_t argb8888 : 1;
......
...@@ -401,8 +401,6 @@ static const struct resource_caps stoney_resource_cap = { ...@@ -401,8 +401,6 @@ static const struct resource_caps stoney_resource_cap = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCE_RGB, .type = DC_PLANE_TYPE_DCE_RGB,
.blends_with_below = true,
.blends_with_above = true,
.per_pixel_alpha = 1, .per_pixel_alpha = 1,
.pixel_format_support = { .pixel_format_support = {
...@@ -428,7 +426,6 @@ static const struct dc_plane_cap plane_cap = { ...@@ -428,7 +426,6 @@ static const struct dc_plane_cap plane_cap = {
static const struct dc_plane_cap underlay_plane_cap = { static const struct dc_plane_cap underlay_plane_cap = {
.type = DC_PLANE_TYPE_DCE_UNDERLAY, .type = DC_PLANE_TYPE_DCE_UNDERLAY,
.blends_with_above = true,
.per_pixel_alpha = 1, .per_pixel_alpha = 1,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -504,8 +504,6 @@ static const struct resource_caps rv2_res_cap = { ...@@ -504,8 +504,6 @@ static const struct resource_caps rv2_res_cap = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -670,8 +670,6 @@ static const struct resource_caps res_cap_nv10 = { ...@@ -670,8 +670,6 @@ static const struct resource_caps res_cap_nv10 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -571,8 +571,6 @@ static const struct resource_caps res_cap_dnc201 = { ...@@ -571,8 +571,6 @@ static const struct resource_caps res_cap_dnc201 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -609,8 +609,6 @@ static const struct resource_caps res_cap_rn_FPGA_2pipe_dsc = { ...@@ -609,8 +609,6 @@ static const struct resource_caps res_cap_rn_FPGA_2pipe_dsc = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -680,8 +680,6 @@ static const struct resource_caps res_cap_dcn3 = { ...@@ -680,8 +680,6 @@ static const struct resource_caps res_cap_dcn3 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -651,8 +651,6 @@ static struct resource_caps res_cap_dcn301 = { ...@@ -651,8 +651,6 @@ static struct resource_caps res_cap_dcn301 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -147,8 +147,6 @@ static const struct resource_caps res_cap_dcn302 = { ...@@ -147,8 +147,6 @@ static const struct resource_caps res_cap_dcn302 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
.argb8888 = true, .argb8888 = true,
......
...@@ -126,8 +126,6 @@ static const struct resource_caps res_cap_dcn303 = { ...@@ -126,8 +126,6 @@ static const struct resource_caps res_cap_dcn303 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
.argb8888 = true, .argb8888 = true,
......
...@@ -827,8 +827,6 @@ static const struct resource_caps res_cap_dcn31 = { ...@@ -827,8 +827,6 @@ static const struct resource_caps res_cap_dcn31 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -855,8 +855,6 @@ static const struct resource_caps res_cap_dcn314 = { ...@@ -855,8 +855,6 @@ static const struct resource_caps res_cap_dcn314 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = { ...@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = { ...@@ -824,8 +824,6 @@ static const struct resource_caps res_cap_dcn31 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -657,8 +657,6 @@ static const struct resource_caps res_cap_dcn32 = { ...@@ -657,8 +657,6 @@ static const struct resource_caps res_cap_dcn32 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
...@@ -655,8 +655,6 @@ static const struct resource_caps res_cap_dcn321 = { ...@@ -655,8 +655,6 @@ static const struct resource_caps res_cap_dcn321 = {
static const struct dc_plane_cap plane_cap = { static const struct dc_plane_cap plane_cap = {
.type = DC_PLANE_TYPE_DCN_UNIVERSAL, .type = DC_PLANE_TYPE_DCN_UNIVERSAL,
.blends_with_above = true,
.blends_with_below = true,
.per_pixel_alpha = true, .per_pixel_alpha = true,
.pixel_format_support = { .pixel_format_support = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment