[Intel-gfx] [PATCH v4 7/8] hack: drm/i915: Always remap gtt

Daniel Vetter daniel at ffwll.ch
Wed Jan 30 09:58:00 UTC 2019


On Thu, Jan 24, 2019 at 09:31:01PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> v2: Rebase due to can_remap()
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c6f59bfb4744..c720891b31c9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2562,6 +2562,9 @@ static bool intel_plane_needs_remap(const struct intel_plane_state *plane_state)
>  	if (!intel_plane_can_remap(plane_state))
>  		return false;
>  
> +	/* HACK: always remap */
> +	return true;

Mildly silly idea, but what if we always do this when we can? Could help a
bit with ggtt fragmentation, since we wouldn't need the big view anymore,
just a few smaller ones. Just an idea really, which would have the side
benefit of making sure we don't break this too often. Of only remap when
there's an actual benefit, i.e. remapping stride/size smaller than full
buffer size.
-Daniel

> +
>  	/* FIXME other color planes? */
>  	stride = intel_fb_pitch(fb, 0, rotation);
>  	max_stride = plane->max_stride(plane, fb->format->format,
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list