Re: [PATCH 1/4] igt_fb: Add Y-tiling support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tvrtko,

Along with this change I made following change in the kernel side. I was not sure if this is a hack of a legitimate change. Could you please give me a pointer about how to move fwd from here? Without this all Y-tiling tests would fail.

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15406,8 +15406,7 @@ static int intel_framebuffer_init(struct drm_device *dev,
                if (obj->tiling_mode == I915_TILING_X)
                        mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED;
                else if (obj->tiling_mode == I915_TILING_Y) {
-                       DRM_DEBUG("No Y tiling for legacy addfb\n");
-                       return -EINVAL;
+                       mode_cmd->modifier[0] = I915_FORMAT_MOD_Y_TILED;
                }
        }

Regards,
Praveen


-----Original Message-----
From: Tvrtko Ursulin [mailto:tvrtko.ursulin@xxxxxxxxxxxxxxx] 
Sent: Tuesday, October 25, 2016 1:36 PM
To: Paneri, Praveen <praveen.paneri@xxxxxxxxx>; intel-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: Re:  [PATCH 1/4] igt_fb: Add Y-tiling support


On 24/10/2016 17:55, Praveen Paneri wrote:
> This adds Y-tiling check in igt_create_fb_with_bo_size as now we 
> should also be able to create Y-tiled FBs.
>
> Signed-off-by: Praveen Paneri <praveen.paneri@xxxxxxxxx>
> ---
>  lib/igt_fb.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 47472f4..bf1d372 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -608,7 +608,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  		  __func__, fb->gem_handle, fb->stride);
>
>  	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
> -	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED) {
> +	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED &&
> +	    tiling != LOCAL_I915_FORMAT_MOD_Y_TILED) {
>  		do_or_die(__kms_addfb(fd, fb->gem_handle, width, height,
>  				      fb->stride, format, tiling,
>  				      LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id));
>

This works now? Ie. doesn't hit "No Y Tiling for legacy addfb" error in the driver?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux