All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [RFC 1/3] drm/i915: Add wrapper for xe compatibility
Date: Wed, 20 Sep 2023 12:52:11 +0300	[thread overview]
Message-ID: <87editrx2s.fsf@intel.com> (raw)
In-Reply-To: <20230920071700.434195-2-chaitanya.kumar.borah@intel.com>

On Wed, 20 Sep 2023, Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> wrote:
> Add a wrapper around intel_step_name to maintain compatibility
> with xe driver. The wrapper will share the same name as the one
> to be used by xe while both drivers include different files as
> needed during compilation.
>
> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_step.c | 5 +++++
>  drivers/gpu/drm/i915/intel_step.h | 1 +
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_step.c b/drivers/gpu/drm/i915/intel_step.c
> index c02a6f156a00..6b62b5fcc792 100644
> --- a/drivers/gpu/drm/i915/intel_step.c
> +++ b/drivers/gpu/drm/i915/intel_step.c
> @@ -352,3 +352,8 @@ const char *intel_step_name(enum intel_step step)
>  		return "**";
>  	}
>  }
> +
> +const char *intel_get_step_name(struct drm_i915_private *i915)
> +{
> +	return intel_step_name(RUNTIME_INFO(i915)->step.display_step);
> +}

Okay, so I've mulled this back and forth. Here's the, uh, steps I think
should be taken:

1) Please name this intel_display_step_name() or
   intel_step_display_name() or something. It's about *display*
   stepping, and just intel_get_step_name() is a misnomer.

2) Use this in intel_dmc.c.

3) Send the above to intel-gfx, based on drm-tip. Make it into a single
   patch. Get it merged to upstream i915.

4) On xe, revert the FIXME patch in question.

5) Add a fixup to remove "#define intel_step_name xe_step_name" from
   compat-i915-headers/i915_drv.h

6) Backport the upstream patch from 3) to xe.

7) Add xe_step_display_name() or similar, mimicking the one added to
   i915. Don't name it the same as in i915.

8) In compat-i915-headers/intel_step.h, add a static inline to bridge
   the call from intel_step_display_name() to xe_step_display_name(). Or
   make it a #define.


BR,
Jani.



> diff --git a/drivers/gpu/drm/i915/intel_step.h b/drivers/gpu/drm/i915/intel_step.h
> index 96dfca4cba73..25a1b1948a43 100644
> --- a/drivers/gpu/drm/i915/intel_step.h
> +++ b/drivers/gpu/drm/i915/intel_step.h
> @@ -78,5 +78,6 @@ enum intel_step {
>  
>  void intel_step_init(struct drm_i915_private *i915);
>  const char *intel_step_name(enum intel_step step);
> +const char *intel_get_step_name(struct drm_i915_private *i915);
>  
>  #endif /* __INTEL_STEP_H__ */

-- 
Jani Nikula, Intel

  reply	other threads:[~2023-09-20  9:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20  7:16 [Intel-xe] [RFC 0/3] Use common wrapper to get step name Chaitanya Kumar Borah
2023-09-20  7:16 ` [Intel-xe] [RFC 1/3] drm/i915: Add wrapper for xe compatibility Chaitanya Kumar Borah
2023-09-20  9:52   ` Jani Nikula [this message]
2023-10-05  4:34     ` Borah, Chaitanya Kumar
2023-09-20  7:16 ` [Intel-xe] [RFC 2/3] drm/xe: Add wrapper over intel_step_name Chaitanya Kumar Borah
2023-09-20  7:17 ` [Intel-xe] [RFC 3/3] drm/i915/dmc: Use common wrapper to get step name Chaitanya Kumar Borah
2023-09-20  8:11 ` [Intel-xe] ✓ CI.Patch_applied: success for Use common wrapper to get step name (rev2) Patchwork
2023-09-20  8:12 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-20  8:13 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-20  8:20 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-20  8:20 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-20  8:21 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-09-18 12:02 [Intel-xe] [RFC 0/3] Use common wrapper to get step name Chaitanya Kumar Borah
2023-09-18 12:02 ` [Intel-xe] [RFC 1/3] drm/i915: Add wrapper for xe compatibility Chaitanya Kumar Borah

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=87editrx2s.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.