public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/7] drm/i915/skl: Allow Y (and Yf) frame buffer creation
Date: Wed, 25 Feb 2015 10:51:01 +0000	[thread overview]
Message-ID: <54EDA915.1070500@linux.intel.com> (raw)
In-Reply-To: <20150224214606.GJ24485@phenom.ffwll.local>


On 02/24/2015 09:46 PM, Daniel Vetter wrote:
> On Mon, Feb 23, 2015 at 03:56:01PM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> By this patch all underlying bits have been implemented and this
>> patch actually enables the feature.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_display.c | 13 ++++++++-----
>>   1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 74d4923..f100086 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -12781,6 +12781,14 @@ static int intel_framebuffer_init(struct drm_device *dev,
>>   			DRM_DEBUG("tiling_mode doesn't match fb modifier\n");
>>   			return -EINVAL;
>>   		}
>> +
>> +		if (INTEL_INFO(dev)->gen < 9 &&
>> +		    (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
>> +		     mode_cmd->modifier[0] == I915_FORMAT_MOD_Yf_TILED)) {
>> +			DRM_DEBUG("Unsupported tiling 0x%llx!\n",
>> +				  mode_cmd->modifier[0]);
>> +			return -EINVAL;
>> +		}
>>   	} else {
>>   		if (obj->tiling_mode == I915_TILING_X)
>>   			mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED;
>> @@ -12790,11 +12798,6 @@ static int intel_framebuffer_init(struct drm_device *dev,
>>   		}
>>   	}
>>
>> -	if (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED) {
>> -		DRM_DEBUG("hardware does not support tiling Y\n");
>> -		return -EINVAL;
>> -	}
>
> Imo the clearer code would be to add a
> 	
> 	switch (mode_cmd->modifier[0]) {
>
> 	}
>
> here and then shovel the platform checks into the supgroups. At least
> that's how we tend to roll these since it reduces the risks that a case is
> forgotten when the enumeration is extended. That would also have caught
> that we don't reject random garbage in the default: case.

Yes that's true - I'll see what I can do.

Regards,

Tvrtko

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

  reply	other threads:[~2015-02-25 10:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 15:55 [PATCH 0/7] Skylake Y tiled scanout Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 1/7] drm/i915/skl: Add new displayable tiling formats Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 2/7] drm/i915/skl: Allow scanning out Y and Yf fbs Tvrtko Ursulin
2015-02-24 16:38   ` Damien Lespiau
2015-02-24 17:36   ` Ville Syrjälä
2015-02-25 10:36     ` Tvrtko Ursulin
2015-02-25 11:32       ` Ville Syrjälä
2015-02-23 15:55 ` [PATCH 3/7] drm/i915/skl: Adjust intel_fb_align_height() for Yb/Yf tiling Tvrtko Ursulin
2015-02-24 16:54   ` Damien Lespiau
2015-02-25 10:54     ` Tvrtko Ursulin
2015-02-25 14:00       ` Damien Lespiau
2015-02-25 15:20         ` Damien Lespiau
2015-02-23 15:55 ` [PATCH 4/7] drm/i915/skl: Teach pin_and_fence_fb_obj() about Y tiling constraints Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 5/7] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling Tvrtko Ursulin
2015-02-24 17:26   ` Damien Lespiau
2015-02-25 10:38     ` Tvrtko Ursulin
2015-02-23 15:56 ` [PATCH 6/7] drm/i915/skl: Update watermarks for Y tiling Tvrtko Ursulin
2015-02-24 19:26   ` Damien Lespiau
2015-02-25 10:34     ` Tvrtko Ursulin
2015-02-25 14:08       ` Damien Lespiau
2015-02-24 21:42   ` Daniel Vetter
2015-02-25 10:50     ` Tvrtko Ursulin
2015-02-25 14:27       ` Damien Lespiau
2015-02-25 15:03       ` Daniel Vetter
2015-02-23 15:56 ` [PATCH 7/7] drm/i915/skl: Allow Y (and Yf) frame buffer creation Tvrtko Ursulin
2015-02-24 19:30   ` Damien Lespiau
2015-02-24 21:46   ` Daniel Vetter
2015-02-25 10:51     ` Tvrtko Ursulin [this message]
2015-02-25  6:08   ` shuang.he
2015-02-24 19:06 ` [PATCH 0/7] Skylake Y tiled scanout Damien Lespiau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54EDA915.1070500@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox