intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	lucas.demarchi@intel.com, ville.syrjala@linux.intel.com,
	joonas.lahtinen@linux.intel.com, tursulin@ursulin.net
Subject: Re: [PATCH v3 5/7] drm/i915/display: accept either i915 or display for feature tests
Date: Wed, 17 Apr 2024 16:05:10 +0300	[thread overview]
Message-ID: <87frvkxhq1.fsf@intel.com> (raw)
In-Reply-To: <Zh6j0OFxODBBDp2j@intel.com>

On Tue, 16 Apr 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Tue, Apr 09, 2024 at 03:26:47PM +0300, Jani Nikula wrote:
>> Use the generic __to_intel_display() to allow passing either struct
>> drm_i915_private * or struct intel_display * to the feature test macros.
>> 
>> Unfortunately, this requires including i915_drv.h in xe display
>> code. This is still better than polluting the main xe_device.h or
>> xe_device_types.h files with the __to_intel_display() macro definition.
>
> what about just duplicating these 2 lines in a compat layer
> (perhaps a new temporary one?) and the only including that
> instead of bringing it entirely?

Added a shared header under display for __to_intel_display(), and the
change in xe can be dropped.

BR,
Jani.


>
> or what else wouldbe needed?
>
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++--
>>  drivers/gpu/drm/xe/display/xe_hdcp_gsc.c            | 1 +
>>  2 files changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 66b51de86e38..01c6a4bef179 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -100,8 +100,8 @@ struct drm_printer;
>>  	(IS_DISPLAY_IP_RANGE((__i915), (ipver), (ipver)) && \
>>  	 IS_DISPLAY_STEP((__i915), (from), (until)))
>>  
>> -#define DISPLAY_INFO(i915)		((i915)->display.info.__device_info)
>> -#define DISPLAY_RUNTIME_INFO(i915)	(&(i915)->display.info.__runtime_info)
>> +#define DISPLAY_INFO(i915)		(__to_intel_display(i915)->info.__device_info)
>> +#define DISPLAY_RUNTIME_INFO(i915)	(&__to_intel_display(i915)->info.__runtime_info)
>>  
>>  #define DISPLAY_VER(i915)	(DISPLAY_RUNTIME_INFO(i915)->ip.ver)
>>  #define DISPLAY_VER_FULL(i915)	IP_VER(DISPLAY_RUNTIME_INFO(i915)->ip.ver, \
>> diff --git a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>> index ac4b870f73fa..54314760f47a 100644
>> --- a/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>> +++ b/drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
>> @@ -19,6 +19,7 @@
>>  #include "xe_map.h"
>>  #include "xe_pm.h"
>>  #include "xe_uc_fw.h"
>> +#include "i915_drv.h"
>>  
>>  #define HECI_MEADDRESS_HDCP 18
>>  
>> -- 
>> 2.39.2
>> 

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-04-17 13:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 12:26 [PATCH v3 0/7] drm/i915: better high level abstraction for display Jani Nikula
2024-04-09 12:26 ` [PATCH v3 1/7] drm/i915/display: add intel_display -> drm_device backpointer Jani Nikula
2024-04-16 16:05   ` Rodrigo Vivi
2024-04-09 12:26 ` [PATCH v3 2/7] drm/i915/display: add generic to_intel_display() macro Jani Nikula
2024-04-16 16:06   ` Rodrigo Vivi
2024-04-09 12:26 ` [PATCH v3 3/7] drm/i915: add generic __to_intel_display() Jani Nikula
2024-04-16 16:08   ` Rodrigo Vivi
2024-04-09 12:26 ` [PATCH v3 4/7] drm/xe/display: " Jani Nikula
2024-04-16 16:10   ` Rodrigo Vivi
2024-04-17  9:53     ` Jani Nikula
2024-04-17 13:04       ` Jani Nikula
2024-04-09 12:26 ` [PATCH v3 5/7] drm/i915/display: accept either i915 or display for feature tests Jani Nikula
2024-04-16 16:14   ` Rodrigo Vivi
2024-04-17 13:05     ` Jani Nikula [this message]
2024-04-09 12:26 ` [PATCH v3 6/7] drm/i915/de: allow intel_display and drm_i915_private for de functions Jani Nikula
2024-04-16 16:16   ` Rodrigo Vivi
2024-04-17 13:05     ` Jani Nikula
2024-04-09 12:26 ` [PATCH v3 7/7] drm/i915/quirks: convert struct drm_i915_private to struct intel_display Jani Nikula
2024-04-16 16:17   ` Rodrigo Vivi
2024-04-09 12:42 ` ✓ CI.Patch_applied: success for drm/i915: better high level abstraction for display (rev2) Patchwork
2024-04-09 12:42 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-09 12:43 ` ✓ CI.KUnit: success " Patchwork
2024-04-09 12:55 ` ✓ CI.Build: " Patchwork
2024-04-09 12:58 ` ✓ CI.Hooks: " Patchwork
2024-04-09 12:59 ` ✗ CI.checksparse: warning " Patchwork
2024-04-09 13:26 ` ✓ CI.BAT: success " Patchwork
2024-04-09 15:26 ` ✓ CI.FULL: " Patchwork
2024-04-16 16:24 ` [PATCH v3 0/7] drm/i915: better high level abstraction for display Rodrigo Vivi

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=87frvkxhq1.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tursulin@ursulin.net \
    --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;
as well as URLs for NNTP newsgroup(s).