From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/sprite: move sprite_name() to intel_sprite.c
Date: Fri, 27 Oct 2023 11:23:31 +0300 [thread overview]
Message-ID: <877cn879to.fsf@intel.com> (raw)
In-Reply-To: <ZSftNdJkXaIglJe2@intel.com>
On Thu, 12 Oct 2023, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Oct 11, 2023 at 11:22:59PM +0300, Jani Nikula wrote:
>> Move sprite_name() where its only user is, and convert it to a function,
>> removing the implicit dev_priv usage.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks, pushed to din.
>
>> ---
>> drivers/gpu/drm/i915/display/intel_display.h | 1 -
>> drivers/gpu/drm/i915/display/intel_sprite.c | 7 ++++++-
>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
>> index 0e5dffe8f018..163469fe67a2 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display.h
>> @@ -105,7 +105,6 @@ enum i9xx_plane_id {
>> };
>>
>> #define plane_name(p) ((p) + 'A')
>> -#define sprite_name(p, s) ((p) * DISPLAY_RUNTIME_INFO(dev_priv)->num_sprites[(p)] + (s) + 'A')
>>
>> #define for_each_plane_id_on_crtc(__crtc, __p) \
>> for ((__p) = PLANE_PRIMARY; (__p) < I915_MAX_PLANES; (__p)++) \
>> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
>> index 1fb16510f750..d7b440c8caef 100644
>> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
>> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
>> @@ -48,6 +48,11 @@
>> #include "intel_frontbuffer.h"
>> #include "intel_sprite.h"
>>
>> +static char sprite_name(struct drm_i915_private *i915, enum pipe pipe, int sprite)
>> +{
>> + return pipe * DISPLAY_RUNTIME_INFO(i915)->num_sprites[pipe] + sprite + 'A';
>> +}
>> +
>> static void i9xx_plane_linear_gamma(u16 gamma[8])
>> {
>> /* The points are not evenly spaced. */
>> @@ -1636,7 +1641,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
>> 0, plane_funcs,
>> formats, num_formats, modifiers,
>> DRM_PLANE_TYPE_OVERLAY,
>> - "sprite %c", sprite_name(pipe, sprite));
>> + "sprite %c", sprite_name(dev_priv, pipe, sprite));
>> kfree(modifiers);
>>
>> if (ret)
>> --
>> 2.39.2
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-10-27 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 20:22 [Intel-gfx] [PATCH] drm/i915/sprite: move sprite_name() to intel_sprite.c Jani Nikula
2023-10-12 12:57 ` Ville Syrjälä
2023-10-27 8:23 ` Jani Nikula [this message]
2023-10-12 22:39 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/sprite: move sprite_name() to intel_sprite.c (rev2) Patchwork
2023-10-24 21:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/sprite: move sprite_name() to intel_sprite.c (rev4) Patchwork
2023-10-25 13:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=877cn879to.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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