public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping
Date: Thu, 19 Mar 2015 15:07:45 +0000	[thread overview]
Message-ID: <550AE641.2010004@linux.intel.com> (raw)
In-Reply-To: <1426770123.3473.29.camel@jlahtine-mobl1>


Hi,

On 03/19/2015 01:02 PM, Joonas Lahtinen wrote:
>>   static inline
>>   int i915_get_ggtt_vma_pages(struct i915_vma *vma)
>
> Same rant about function signatures as on earlier patch, put all on the
> same line like most of new the code has it.

Ok.

>>   struct i915_ggtt_view {
>>   	enum i915_ggtt_view_type type;
>>
>>   	struct sg_table *pages;
>> +
>> +	union {
>> +		struct intel_rotation_info rotation_info;
>> +	};
>
> In preparation for the memcmp way of comparing views, I would move this
> be before the variable struct parts (namely sg_table *pages), and also
> wrap it once more so the result would be like this:
>
> [snip]
> enum i915_ggtt_view_type type;
>
> union {
> 	struct {
> 		struct intel_rotation_info info;
> 	} rotated;
> 	struct {
> 		...
> 	} partial;
> };
>
> // private bits go here, to be wrapped in their struct with view
> // type comparing patches
>
> struct sg_table *pages;
> [snip]
>
> That way it's clear which view owns what.

Hm, rotation info is not considered in comparing views, it is just a 
bucket of data passed around between layers. So I suppose private data 
under your design. Since there is no private union yet, maybe do this later?

>>   extern const struct i915_ggtt_view i915_ggtt_view_normal;
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index fe11e99..c2c3a76 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -2194,7 +2194,7 @@ static bool need_vtd_wa(struct drm_device *dev)
>>   	return false;
>>   }
>>
>> -static unsigned int
>> +unsigned int
>>   intel_tile_height(struct drm_device *dev, uint32_t pixel_format,
>>   		  uint64_t fb_format_modifier)
>>   {
>> @@ -2254,9 +2254,34 @@ int intel_fill_fb_ggtt_view(struct i915_ggtt_view *view,
>>   			    struct drm_framebuffer *fb,
>>   			    const struct drm_plane_state *plane_state)
>>   {
>> +	struct intel_rotation_info *info = &view->rotation_info;
>> +	static const struct i915_ggtt_view rotated_view =
>> +				{ .type = I915_GGTT_VIEW_ROTATED };
>> +
>>   	*view = i915_ggtt_view_normal;
>>
>> -	return 0;
>> +	if (!plane_state)
>> +		return 0;
>> +
>> +	if (!(plane_state->rotation &
>> +	    (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270))))
>> +		return 0;
>
> Should the rotation checking helper introduced in previous patch be used
> here too?

It's the other way round, following patch adds the helper and replaces 
this with a call to it.

Regards,

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

  reply	other threads:[~2015-03-19 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 15:45 [PATCH v4 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-17 15:45 ` [PATCH 1/7] drm/i915/skl: Extract tile height code into a helper function Tvrtko Ursulin
2015-03-18 12:50   ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 2/7] drm/i915: Use GGTT view when (un)pinning objects to planes Tvrtko Ursulin
2015-03-18 13:52   ` Joonas Lahtinen
2015-03-18 13:57     ` Daniel Vetter
2015-03-17 15:45 ` [PATCH 3/7] drm/i915: Pass in plane state when (un)pinning frame buffers Tvrtko Ursulin
2015-03-18 14:01   ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 4/7] drm/i915: Helper function to determine GGTT view from plane state Tvrtko Ursulin
2015-03-18 14:10   ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping Tvrtko Ursulin
2015-03-19 13:02   ` Joonas Lahtinen
2015-03-19 15:07     ` Tvrtko Ursulin [this message]
2015-03-20 12:01       ` Joonas Lahtinen
2015-03-20 12:11         ` Tvrtko Ursulin
2015-03-20 13:31           ` Joonas Lahtinen
2015-03-20 13:44             ` Tvrtko Ursulin
2015-03-17 15:45 ` [PATCH 6/7] drm/i915/skl: Query display address through a wrapper Tvrtko Ursulin
2015-03-19 13:03   ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 7/7] drm/i915/skl: Take 90/270 rotation into account in watermark calculations Tvrtko Ursulin
2015-03-19 14:05   ` Joonas Lahtinen
  -- strict thread matches above, loose matches on Subject: below --
2015-03-23 11:10 [PATCH v5 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-23 11:10 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping Tvrtko Ursulin
2015-03-23 13:03   ` Joonas Lahtinen
2015-03-05 14:07 [PATCH v3 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-05 14:07 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping Tvrtko Ursulin

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=550AE641.2010004@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.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