<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Jani Nikula <jani.nikula@linux.intel.com><br>
<b>Sent:</b> Monday, September 28, 2020 7:07 PM<br>
<b>To:</b> Surendrakumar Upadhyay, TejaskumarX <tejaskumarx.surendrakumar.upadhyay@intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>; airlied@linux.ie <airlied@linux.ie>; daniel@ffwll.ch <daniel@ffwll.ch>; intel-gfx@lists.freedesktop.org <intel-gfx@lists.freedesktop.org>;
dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Ausmus, James <james.ausmus@intel.com>; Roper, Matthew D <matthew.d.roper@intel.com>; Souza, Jose <jose.souza@intel.com>; ville.syrjala@linux.intel.com
<ville.syrjala@linux.intel.com>; De Marchi, Lucas <lucas.demarchi@intel.com>; Pandey, Hariom <hariom.pandey@intel.com><br>
<b>Subject:</b> Re: [PATCH 1/2] drm/i915/jsl: Split EHL/JSL platform info and PCI ids</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">On Mon, 28 Sep 2020, Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:<br>
> Split the basic platform definition, macros, and PCI IDs to<br>
> differentiate between EHL and JSL platforms.<br>
><br>
> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com><br>
> ---<br>
> drivers/gpu/drm/i915/i915_drv.h | 4 +++-<br>
> drivers/gpu/drm/i915/i915_pci.c | 9 +++++++++<br>
> drivers/gpu/drm/i915/intel_device_info.c | 1 +<br>
> drivers/gpu/drm/i915/intel_device_info.h | 1 +<br>
> include/drm/i915_pciids.h | 9 ++++++---<br>
> 5 files changed, 20 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h<br>
> index 72a9449b674e..4f20acebb038 100644<br>
> --- a/drivers/gpu/drm/i915/i915_drv.h<br>
> +++ b/drivers/gpu/drm/i915/i915_drv.h<br>
> @@ -1417,7 +1417,9 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,<br>
> #define IS_COMETLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_COMETLAKE)<br>
> #define IS_CANNONLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_CANNONLAKE)<br>
> #define IS_ICELAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ICELAKE)<br>
> -#define IS_ELKHARTLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ELKHARTLAKE)<br>
> +#define IS_ELKHARTLAKE(dev_priv) (IS_PLATFORM(dev_priv, INTEL_ELKHARTLAKE) || \<br>
> + IS_PLATFORM(dev_priv, INTEL_JASPERLAKE))<br>
> +#define IS_JASPERLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_JASPERLAKE)<br>
<br>
I think we've learned from history that we want the platform checks to<br>
be independent. I.e. if you need to split ELK and JSP, you need to make<br>
IS_ELKHARTLAKE() match *only* ELK, and you need to replace every current<br>
IS_ELKHARTLAKE() check with IS_ELKHARTLAKE() || IS_JASPERLAKE().<br>
<br>
We've been here before, and we've thought before that we can get by with<br>
the minimal change. It's just postponing the inevitable and generates<br>
confusion.<br>
<br>
BR,<br>
Jani.<br>
<br>
Tejas : Replacing <span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">IS_ELKHARTLAKE()
|| IS_JASPERLAKE() everywhere will make lot of changes at each place. To avoid huge change and to differentiate between platforms we have taken this way. Do you think we still change it everywhere? Do you have example where it can harm this change?</span><br>
<br>
> #define IS_TIGERLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_TIGERLAKE)<br>
> #define IS_ROCKETLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ROCKETLAKE)<br>
> #define IS_DG1(dev_priv) IS_PLATFORM(dev_priv, INTEL_DG1)<br>
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c<br>
> index 366ddfc8df6b..8690b69fcf33 100644<br>
> --- a/drivers/gpu/drm/i915/i915_pci.c<br>
> +++ b/drivers/gpu/drm/i915/i915_pci.c<br>
> @@ -846,6 +846,14 @@ static const struct intel_device_info ehl_info = {<br>
> .ppgtt_size = 36,<br>
> };<br>
> <br>
> +static const struct intel_device_info jsl_info = {<br>
> + GEN11_FEATURES,<br>
> + PLATFORM(INTEL_JASPERLAKE),<br>
> + .require_force_probe = 1,<br>
> + .platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(VCS0) | BIT(VECS0),<br>
> + .ppgtt_size = 36,<br>
> +};<br>
> +<br>
> #define GEN12_FEATURES \<br>
> GEN11_FEATURES, \<br>
> GEN(12), \<br>
> @@ -985,6 +993,7 @@ static const struct pci_device_id pciidlist[] = {<br>
> INTEL_CNL_IDS(&cnl_info),<br>
> INTEL_ICL_11_IDS(&icl_info),<br>
> INTEL_EHL_IDS(&ehl_info),<br>
> + INTEL_JSL_IDS(&jsl_info),<br>
> INTEL_TGL_12_IDS(&tgl_info),<br>
> INTEL_RKL_IDS(&rkl_info),<br>
> {0, 0, 0}<br>
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c<br>
> index adc836f15fde..e67cec8fa2aa 100644<br>
> --- a/drivers/gpu/drm/i915/intel_device_info.c<br>
> +++ b/drivers/gpu/drm/i915/intel_device_info.c<br>
> @@ -62,6 +62,7 @@ static const char * const platform_names[] = {<br>
> PLATFORM_NAME(CANNONLAKE),<br>
> PLATFORM_NAME(ICELAKE),<br>
> PLATFORM_NAME(ELKHARTLAKE),<br>
> + PLATFORM_NAME(JASPERLAKE),<br>
> PLATFORM_NAME(TIGERLAKE),<br>
> PLATFORM_NAME(ROCKETLAKE),<br>
> PLATFORM_NAME(DG1),<br>
> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h<br>
> index 6a3d607218aa..d92fa041c700 100644<br>
> --- a/drivers/gpu/drm/i915/intel_device_info.h<br>
> +++ b/drivers/gpu/drm/i915/intel_device_info.h<br>
> @@ -79,6 +79,7 @@ enum intel_platform {<br>
> /* gen11 */<br>
> INTEL_ICELAKE,<br>
> INTEL_ELKHARTLAKE,<br>
> + INTEL_JASPERLAKE,<br>
> /* gen12 */<br>
> INTEL_TIGERLAKE,<br>
> INTEL_ROCKETLAKE,<br>
> diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h<br>
> index 7eeecb07c9a1..1b5e09cfa11e 100644<br>
> --- a/include/drm/i915_pciids.h<br>
> +++ b/include/drm/i915_pciids.h<br>
> @@ -579,15 +579,18 @@<br>
> INTEL_VGA_DEVICE(0x8A51, info), \<br>
> INTEL_VGA_DEVICE(0x8A5D, info)<br>
> <br>
> -/* EHL/JSL */<br>
> +/* EHL */<br>
> #define INTEL_EHL_IDS(info) \<br>
> INTEL_VGA_DEVICE(0x4500, info), \<br>
> INTEL_VGA_DEVICE(0x4571, info), \<br>
> INTEL_VGA_DEVICE(0x4551, info), \<br>
> INTEL_VGA_DEVICE(0x4541, info), \<br>
> - INTEL_VGA_DEVICE(0x4E71, info), \<br>
> INTEL_VGA_DEVICE(0x4557, info), \<br>
> - INTEL_VGA_DEVICE(0x4555, info), \<br>
> + INTEL_VGA_DEVICE(0x4555, info)<br>
> +<br>
> +/* JSL */<br>
> +#define INTEL_JSL_IDS(info) \<br>
> + INTEL_VGA_DEVICE(0x4E71, info), \<br>
> INTEL_VGA_DEVICE(0x4E61, info), \<br>
> INTEL_VGA_DEVICE(0x4E57, info), \<br>
> INTEL_VGA_DEVICE(0x4E55, info), \<br>
<br>
-- <br>
Jani Nikula, Intel Open Source Graphics Center<br>
</div>
</span></font></div>
</div>
</body>
</html>