From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Jindal, Sonika" <sonika.jindal@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/skl: Support for 90/270 rotation
Date: Thu, 02 Apr 2015 09:55:35 +0100 [thread overview]
Message-ID: <551D0407.5060708@linux.intel.com> (raw)
In-Reply-To: <551CCB6A.40608@intel.com>
Hi,
On 04/02/2015 05:54 AM, Jindal, Sonika wrote:
>>> diff --git a/drivers/gpu/drm/i915/intel_display.c
>>> b/drivers/gpu/drm/i915/intel_display.c
>>> index f0bbc22..86ee0f0 100644
>>> --- a/drivers/gpu/drm/i915/intel_display.c
>>> +++ b/drivers/gpu/drm/i915/intel_display.c
>>> @@ -2318,6 +2318,28 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view
>>> *view, struct drm_framebuffer *fb,
>>> return -EINVAL;
>>> }
>>>
>>> + switch (fb->pixel_format) {
>>> + case DRM_FORMAT_XRGB8888:
>>> + case DRM_FORMAT_ARGB8888:
>>> + case DRM_FORMAT_XBGR8888:
>>> + case DRM_FORMAT_ABGR8888:
>>> + case DRM_FORMAT_XRGB2101010:
>>> + case DRM_FORMAT_ARGB2101010:
>>> + case DRM_FORMAT_XBGR2101010:
>>> + case DRM_FORMAT_ABGR2101010:
>>> + case DRM_FORMAT_YUYV:
>>> + case DRM_FORMAT_YVYU:
>>> + case DRM_FORMAT_UYVY:
>>> + case DRM_FORMAT_VYUY:
>>> + case DRM_FORMAT_NV12:
>>> + break;
>>> +
>>> + default:
>>> + DRM_DEBUG_KMS("Unsupported pixel format:%d for 90/270
>>> rotation!\n",
>>> + fb->pixel_format);
>>> + return -EINVAL;
>>> + }
>>
>> Shouldn't we be matching against the list of formats the plane supports
>> (which may vary by platform, or by specific plane) rather than this
>> generic list? We already specified what formats the plane can handle at
>> plane init time, so it seems like what you'd really want is just a call
>> to
>>
>> drm_plane_check_pixel_format(plane_state->plane, fb->pixel_format)
>>
>> then follow that up with explicit checks to exclude any formats that we
>> can handle in 0/180, but not in 90/270.
>>
> I am not sure how it will help. drm_plane_check_pixel_format should be
> used to check the pixel format of the fb which we should be doing in
> some -check functions (I don't think we do that right now?) against what
> is supported by the plane.
> But to check for the formats which are allowed for 90/270, we would need
> this kind of explicit check.
>
>> I'd also move this check to intel_plane_atomic_check(), since the
>> 'check' code path is where I'd usually go looking for these types of
>> checks; the function you've got it in at the moment gets called from the
>> 'prepare' step which works as well, but seems a bit less obvious.
>>
> Yes, I agree, but this is on top of Tvrtko's patch for secondary buffer
> mapping where based upon tiling and pixel format we are allowing the
> rotated gtt.
>
> Tvrtko,
> Can these be moved to the intel_plane_atomic_check()
Good point, I think it can and should. I suppose it was just an
oversight during endless rebasing, that I put the Y tiling check in
there. So you can move that part as well while you are doing it.
Also highlights the fact we have no negative testing in kms_rotation_crc
for this. I mean, trying to rotate by 90/270 linear or X tiled, or wrong
pixel format.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-04-02 8:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 8:34 [PATCH 1/2] drm/i915/skl: Allow universal planes to position Sonika Jindal
2015-03-30 8:34 ` [PATCH 2/2] drm/i915/skl: Support for 90/270 rotation Sonika Jindal
2015-03-30 12:15 ` shuang.he
2015-04-01 18:22 ` Matt Roper
2015-04-02 4:54 ` Jindal, Sonika
2015-04-02 8:55 ` Tvrtko Ursulin [this message]
2015-04-02 15:59 ` Matt Roper
2015-04-06 12:27 ` Jindal, Sonika
2015-04-07 8:13 ` Daniel Vetter
2015-04-07 8:22 ` Jindal, Sonika
2015-04-07 8:26 ` [PATCH] " Sonika Jindal
2015-04-07 10:59 ` shuang.he
2015-04-09 22:54 ` Matt Roper
2015-04-01 18:21 ` [PATCH 1/2] drm/i915/skl: Allow universal planes to position Matt Roper
2015-04-02 4:38 ` Jindal, Sonika
2015-04-02 15:48 ` Matt Roper
2015-04-06 5:20 ` Jindal, Sonika
2015-04-07 8:16 ` Daniel Vetter
2015-04-07 8:21 ` Jindal, Sonika
-- strict thread matches above, loose matches on Subject: below --
2015-04-10 9:07 Sonika Jindal
2015-04-10 9:07 ` [PATCH 2/2] drm/i915/skl: Support for 90/270 rotation Sonika Jindal
2015-04-10 14:17 ` Daniel Vetter
2015-04-10 14:44 ` Ville Syrjälä
2015-04-13 4:06 ` Jindal, Sonika
2015-04-13 10:10 ` Ville Syrjälä
2015-04-13 10:23 ` Jindal, Sonika
2015-04-13 10:49 ` Ville Syrjälä
2015-04-13 23:39 ` Matt Roper
2015-04-14 12:19 ` Jindal, Sonika
2015-04-14 17:27 ` Daniel Vetter
2015-04-13 11:10 ` Damien Lespiau
2015-04-13 4:02 ` Jindal, Sonika
2015-04-14 3:56 ` shuang.he
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=551D0407.5060708@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=sonika.jindal@intel.com \
/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