summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/skl_universal_plane.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2021-03-25 23:48:01 +0200
committerImre Deak <imre.deak@intel.com>2021-03-29 22:58:12 +0300
commitee456a4ca5adef31ffd86c0386d7ac7b367d6533 (patch)
tree66afb7d307d9ec19f2f922560a257f3a9aab7a96 /drivers/gpu/drm/i915/display/skl_universal_plane.c
parent67cfab66139b60939ad3dac2da6619f4998fd192 (diff)
drm/i915: Simplify copying the FB view state to the plane state
Instead of copying separately the GTT remapped and color plane view info from the FB to the plane state, do this by copying the whole intel_fb_view struct. For this we make sure the FB view state is fully inited (that is also including the view type) already during FB creation, so this init is not required during atomic check time. This also means the we don't need to reset the unused color plane info during atomic check, as these are already reset during FB creation. I noticed that initial FBs will only work atm if they are page aligned (which BIOS most probably always ensures), but add a comment to sanitize this part once. Also we won't disable the plane if get_initial_plane_config() failed for some reason (for instance due to unsupported rotation), add a TODO: comment for this too. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-19-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/skl_universal_plane.c')
-rw-r--r--drivers/gpu/drm/i915/display/skl_universal_plane.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 2e808985d1ac..7ffd7b570b54 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -1538,7 +1538,7 @@ static int skl_check_ccs_aux_surface(struct intel_plane_state *plane_state)
static int skl_check_plane_surface(struct intel_plane_state *plane_state)
{
const struct drm_framebuffer *fb = plane_state->hw.fb;
- int ret, i;
+ int ret;
ret = intel_plane_compute_gtt(plane_state);
if (ret)
@@ -1564,12 +1564,6 @@ static int skl_check_plane_surface(struct intel_plane_state *plane_state)
return ret;
}
- for (i = fb->format->num_planes; i < ARRAY_SIZE(plane_state->view.color_plane); i++) {
- plane_state->view.color_plane[i].offset = 0;
- plane_state->view.color_plane[i].x = 0;
- plane_state->view.color_plane[i].y = 0;
- }
-
ret = skl_check_main_surface(plane_state);
if (ret)
return ret;