diff mbox series

[03/13] drm/i915/display: Add macro HAS_ULTRAJOINER()

Message ID 20240930163549.416410-4-ankit.k.nautiyal@intel.com (mailing list archive)
State New, archived
Headers show
Series Ultrajoiner basic functionality series | expand

Commit Message

Nautiyal, Ankit K Sept. 30, 2024, 4:35 p.m. UTC
Add macro to check if platform supports Ultrajoiner.

v2:
-Use check for DISPLAY_VER >= 20, and add bmg as a special case. (Ville)
-Add check for HAS_DSC. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_device.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jani Nikula Oct. 1, 2024, 12:02 p.m. UTC | #1
On Mon, 30 Sep 2024, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
> Add macro to check if platform supports Ultrajoiner.
>
> v2:
> -Use check for DISPLAY_VER >= 20, and add bmg as a special case. (Ville)
> -Add check for HAS_DSC. (Ville)
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_device.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 6a5bee59e6aa..220cca6333ee 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -154,6 +154,9 @@ enum intel_display_subplatform {
>  #define HAS_TRANSCODER(i915, trans)	((DISPLAY_RUNTIME_INFO(i915)->cpu_transcoder_mask & \
>  					  BIT(trans)) != 0)
>  #define HAS_UNCOMPRESSED_JOINER(i915)	(DISPLAY_VER(i915) >= 13)
> +#define HAS_ULTRAJOINER(i915)		((DISPLAY_VER(i915) >= 20 || \
> +					  (IS_DGFX(i915) && DISPLAY_VER(i915) == 14)) && \

Do we need to depend on IS_DGFX() here?

BR,
Jani.

> +					 HAS_DSC(i915))
>  #define HAS_VRR(i915)			(DISPLAY_VER(i915) >= 11)
>  #define HAS_AS_SDP(i915)		(DISPLAY_VER(i915) >= 13)
>  #define HAS_CMRR(i915)			(DISPLAY_VER(i915) >= 20)
Nautiyal, Ankit K Oct. 1, 2024, 2:13 p.m. UTC | #2
On 10/1/2024 5:32 PM, Jani Nikula wrote:
> On Mon, 30 Sep 2024, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote:
>> Add macro to check if platform supports Ultrajoiner.
>>
>> v2:
>> -Use check for DISPLAY_VER >= 20, and add bmg as a special case. (Ville)
>> -Add check for HAS_DSC. (Ville)
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_display_device.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 6a5bee59e6aa..220cca6333ee 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -154,6 +154,9 @@ enum intel_display_subplatform {
>>   #define HAS_TRANSCODER(i915, trans)	((DISPLAY_RUNTIME_INFO(i915)->cpu_transcoder_mask & \
>>   					  BIT(trans)) != 0)
>>   #define HAS_UNCOMPRESSED_JOINER(i915)	(DISPLAY_VER(i915) >= 13)
>> +#define HAS_ULTRAJOINER(i915)		((DISPLAY_VER(i915) >= 20 || \
>> +					  (IS_DGFX(i915) && DISPLAY_VER(i915) == 14)) && \
> Do we need to depend on IS_DGFX() here?

For Display 14, yes as its supported on Battlemage only. I think Stan 
had used IS_DGFX() in original series, I went ahead with it.

We can replace with IS_BATTLEMAGE() if required.

Regards,

Ankit

>
> BR,
> Jani.
>
>> +					 HAS_DSC(i915))
>>   #define HAS_VRR(i915)			(DISPLAY_VER(i915) >= 11)
>>   #define HAS_AS_SDP(i915)		(DISPLAY_VER(i915) >= 13)
>>   #define HAS_CMRR(i915)			(DISPLAY_VER(i915) >= 20)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
index 6a5bee59e6aa..220cca6333ee 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.h
+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
@@ -154,6 +154,9 @@  enum intel_display_subplatform {
 #define HAS_TRANSCODER(i915, trans)	((DISPLAY_RUNTIME_INFO(i915)->cpu_transcoder_mask & \
 					  BIT(trans)) != 0)
 #define HAS_UNCOMPRESSED_JOINER(i915)	(DISPLAY_VER(i915) >= 13)
+#define HAS_ULTRAJOINER(i915)		((DISPLAY_VER(i915) >= 20 || \
+					  (IS_DGFX(i915) && DISPLAY_VER(i915) == 14)) && \
+					 HAS_DSC(i915))
 #define HAS_VRR(i915)			(DISPLAY_VER(i915) >= 11)
 #define HAS_AS_SDP(i915)		(DISPLAY_VER(i915) >= 13)
 #define HAS_CMRR(i915)			(DISPLAY_VER(i915) >= 20)