[Intel-gfx] [PATCH v2 14/27] drm/i915: clean up atomic plane check functions
Matt Roper
matthew.d.roper at intel.com
Wed Jun 10 18:35:25 PDT 2015
On Thu, Jun 04, 2015 at 02:47:44PM +0200, Maarten Lankhorst wrote:
> By passing crtc_state to the check_plane functions a lot of duplicated
> code can be removed. And now that the transitional helpers are gone the
> crtc_state can be reliably obtained.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_atomic_plane.c | 4 ++-
> drivers/gpu/drm/i915/intel_display.c | 48 ++++++++++---------------------
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_sprite.c | 13 +++------
> 4 files changed, 23 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index aa2128369a0a..4d8cacbca777 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -119,6 +119,8 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
> crtc = crtc ? crtc : plane->crtc;
> intel_crtc = to_intel_crtc(crtc);
>
> + intel_state->visible = false;
> +
What do we need this change for? Primary and cursor check functions
immediately overwrite state->visible, so setting this here has no
effect. The sprite case where fb==NULL is the only case where this
would matter, but moving the assignment from the sprite check function
to here doesn't seem like it gains us anything.
Here's the only effect I see it having:
> @@ -757,14 +758,8 @@ intel_check_sprite_plane(struct drm_plane *plane,
<snip>
> - if (!fb) {
> - state->visible = false;
> + if (!fb)
> return 0;
> - }
>
> /* Don't modify another pipe's plane */
> if (intel_plane->pipe != intel_crtc->pipe) {
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
More information about the Intel-gfx
mailing list