dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/hwconfig: Future-proof platform checks
@ 2022-05-24 23:59 Matt Roper
  2022-05-25 18:50 ` John Harrison
  2022-05-25 23:47 ` [Intel-gfx] " Lucas De Marchi
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Roper @ 2022-05-24 23:59 UTC (permalink / raw)
  To: intel-gfx; +Cc: John Harrison, dri-devel, Radhakrishna Sripada

PVC also has a hwconfig table.  Actually the current expectation is that
all future platforms will have hwconfig, so let's just change the
condition to an IP version check so that we don't need to keep updating
this for each new platform that shows up.

Cc: John Harrison <john.c.harrison@intel.com>
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
index 5aaa3948de74..4781fccc2687 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
@@ -96,7 +96,7 @@ static bool has_table(struct drm_i915_private *i915)
 {
 	if (IS_ALDERLAKE_P(i915) && !IS_ADLP_N(i915))
 		return true;
-	if (IS_DG2(i915))
+	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55))
 		return true;
 
 	return false;
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915/hwconfig: Future-proof platform checks
  2022-05-24 23:59 [PATCH] drm/i915/hwconfig: Future-proof platform checks Matt Roper
@ 2022-05-25 18:50 ` John Harrison
  2022-05-25 23:47 ` [Intel-gfx] " Lucas De Marchi
  1 sibling, 0 replies; 3+ messages in thread
From: John Harrison @ 2022-05-25 18:50 UTC (permalink / raw)
  To: Matt Roper, intel-gfx; +Cc: dri-devel, Radhakrishna Sripada

On 5/24/2022 16:59, Matt Roper wrote:
> PVC also has a hwconfig table.  Actually the current expectation is that
> all future platforms will have hwconfig, so let's just change the
> condition to an IP version check so that we don't need to keep updating
> this for each new platform that shows up.
>
> Cc: John Harrison <john.c.harrison@intel.com>
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> index 5aaa3948de74..4781fccc2687 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> @@ -96,7 +96,7 @@ static bool has_table(struct drm_i915_private *i915)
>   {
>   	if (IS_ALDERLAKE_P(i915) && !IS_ADLP_N(i915))
>   		return true;
> -	if (IS_DG2(i915))
> +	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55))
>   		return true;
>   
>   	return false;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/hwconfig: Future-proof platform checks
  2022-05-24 23:59 [PATCH] drm/i915/hwconfig: Future-proof platform checks Matt Roper
  2022-05-25 18:50 ` John Harrison
@ 2022-05-25 23:47 ` Lucas De Marchi
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas De Marchi @ 2022-05-25 23:47 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx, dri-devel

On Tue, May 24, 2022 at 04:59:06PM -0700, Matt Roper wrote:
>PVC also has a hwconfig table.  Actually the current expectation is that
>all future platforms will have hwconfig, so let's just change the
>condition to an IP version check so that we don't need to keep updating
>this for each new platform that shows up.
>
>Cc: John Harrison <john.c.harrison@intel.com>
>Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
>---
> drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
>index 5aaa3948de74..4781fccc2687 100644
>--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
>+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
>@@ -96,7 +96,7 @@ static bool has_table(struct drm_i915_private *i915)
> {
> 	if (IS_ALDERLAKE_P(i915) && !IS_ADLP_N(i915))
> 		return true;
>-	if (IS_DG2(i915))
>+	if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55))
> 		return true;

probably a matter of taste, but given gcc's history on how to decide
when to inline[1], could be better as

	return GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55) ||
		(IS_ALDERLAKE_P(i915) && !IS_ADLP_N(i915));

Lucas De Marchi

[1] https://lwn.net/Articles/767884/

>
> 	return false;
>-- 
>2.35.3
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-25 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 23:59 [PATCH] drm/i915/hwconfig: Future-proof platform checks Matt Roper
2022-05-25 18:50 ` John Harrison
2022-05-25 23:47 ` [Intel-gfx] " Lucas De Marchi

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).