[PATCH v2 3/6] drm/i915: Stop inheriting IP_VER(12, 50)
Gustavo Sousa
gustavo.sousa at intel.com
Wed Mar 13 02:08:55 UTC 2024
Quoting Lucas De Marchi (2024-03-12 20:51:42-03:00)
>All the platforms that inherit the media/graphics version
>from XE_HPM_FEATURES / XE_HP_FEATURES just override it to another
>version. Just set the version directly in the respective struct
>and remove the versions from the _FEATURES macros. Since that was the
>only use for XE_HPM_FEATURES, remove it completely.
>
>Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
I took a look at the patch and also checked with the following script:
#!/bin/bash
parse_info()
{
local rev=$1
local out=$2
echo "Generating info for $(git log -n1 --format="%h %s" "$rev")"
git checkout "$rev"
make drivers/gpu/drm/i915/i915_pci.i
echo
cat drivers/gpu/drm/i915/i915_pci.i \
| grep -o \
-e 'struct\s\+intel_device_info\s\+[^=]\+' \
-e '.__runtime.\(graphics\|media\).ip.\(ver\|rel\)\s*=[^,]\+' \
| awk '
/intel_device_info/ { cur_info_var = $3 }
/__runtime/ { info[cur_info_var "::" $1] = cur_info_var "::" $0 }
END {
for (k in info) {
print info[k]
}
}
' \
| sort \
> $out
}
parse_info c70b324e95d2a06d663111ce3498729e1f9729f9~ /tmp/a
parse_info c70b324e95d2a06d663111ce3498729e1f9729f9 /tmp/b
diff_content=$(git diff --no-index -- /tmp/a /tmp/b)
if [[ -z $diff_content ]]; then
echo "Patch looks sane :-)"
else
echo "Patch generates different IP versions!"
echo
print $diff_content
fi
And I got the following output:
Generating info for eba0fccec7de drm/i915: Remove XEHP_FWRANGES()
Previous HEAD position was c70b324e95d2 drm/i915: Stop inheriting IP_VER(12, 50)
HEAD is now at eba0fccec7de drm/i915: Remove XEHP_FWRANGES()
CALL scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CPP [M] drivers/gpu/drm/i915/i915_pci.i
Generating info for c70b324e95d2 drm/i915: Stop inheriting IP_VER(12, 50)
Previous HEAD position was eba0fccec7de drm/i915: Remove XEHP_FWRANGES()
HEAD is now at c70b324e95d2 drm/i915: Stop inheriting IP_VER(12, 50)
CALL scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CPP [M] drivers/gpu/drm/i915/i915_pci.i
Patch looks sane :-)
Based on that,
Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>
>---
> drivers/gpu/drm/i915/i915_pci.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
>index b318b7c6bf73..8b673fdcf178 100644
>--- a/drivers/gpu/drm/i915/i915_pci.c
>+++ b/drivers/gpu/drm/i915/i915_pci.c
>@@ -705,8 +705,6 @@ static const struct intel_device_info adl_p_info = {
> I915_GTT_PAGE_SIZE_2M
>
> #define XE_HP_FEATURES \
>- .__runtime.graphics.ip.ver = 12, \
>- .__runtime.graphics.ip.rel = 50, \
> XE_HP_PAGE_SIZES, \
> TGL_CACHELEVEL, \
> .dma_mask_size = 46, \
>@@ -730,15 +728,12 @@ static const struct intel_device_info adl_p_info = {
> .__runtime.ppgtt_size = 48, \
> .__runtime.ppgtt_type = INTEL_PPGTT_FULL
>
>-#define XE_HPM_FEATURES \
>- .__runtime.media.ip.ver = 12, \
>- .__runtime.media.ip.rel = 50
>-
> #define DG2_FEATURES \
> XE_HP_FEATURES, \
>- XE_HPM_FEATURES, \
> DGFX_FEATURES, \
>+ .__runtime.graphics.ip.ver = 12, \
> .__runtime.graphics.ip.rel = 55, \
>+ .__runtime.media.ip.ver = 12, \
> .__runtime.media.ip.rel = 55, \
> PLATFORM(INTEL_DG2), \
> .has_64k_pages = 1, \
>@@ -773,9 +768,10 @@ static const struct intel_device_info ats_m_info = {
> __maybe_unused
> static const struct intel_device_info pvc_info = {
> XE_HPC_FEATURES,
>- XE_HPM_FEATURES,
> DGFX_FEATURES,
>+ .__runtime.graphics.ip.ver = 12,
> .__runtime.graphics.ip.rel = 60,
>+ .__runtime.media.ip.ver = 12,
> .__runtime.media.ip.rel = 60,
> PLATFORM(INTEL_PONTEVECCHIO),
> .has_flat_ccs = 0,
>--
>2.43.0
>
More information about the Intel-gfx
mailing list