[PATCH i-g-t v1 1/3] drm-uapi/xe_drm: Read flat ccs value from drm_xe_query_config
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Mar 26 06:03:53 UTC 2024
On Mon, Mar 25, 2024 at 10:29:26PM -0700, Jahagirdar, Akshata wrote:
>
> On 3/25/2024 10:19 PM, Zbigniew Kempczyński wrote:
> > On Tue, Mar 26, 2024 at 02:54:36AM -0700, Akshata Jahagirdar wrote:
> > > Add an additional drm_xe_query_config_flag for reading the value
> > > of flat_ccs of the platform.
> > > This can be used in respective igt testcases.
> > >
> > > Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> > > ---
> > > include/drm-uapi/xe_drm.h | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
> > > index 4353595a4..b43c8cf76 100644
> > > --- a/include/drm-uapi/xe_drm.h
> > > +++ b/include/drm-uapi/xe_drm.h
> > > @@ -389,6 +389,8 @@ struct drm_xe_query_mem_regions {
> > > *
> > > * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM - Flag is set if the device
> > > * has usable VRAM
> > > + * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_FLAT_CCS - Flag is set if the device
> > > + * has flat ccs enabled
> > > * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
> > > * required by this device, typically SZ_4K or SZ_64K
> > > * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address
> > > @@ -405,6 +407,7 @@ struct drm_xe_query_config {
> > > #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID 0
> > > #define DRM_XE_QUERY_CONFIG_FLAGS 1
> > > #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)
> > > + #define DRM_XE_QUERY_CONFIG_FLAG_HAS_FLAT_CCS (1 << 1)
> > May you point me out which kernel patch includes this flag into
> > xe_query.c?
> >
> > --
> > Zbigniew
>
> https://patchwork.freedesktop.org/series/131609/
Ok, I've found it already and replied.
Anyway your igt changes won't compile until above change will be
merged. UAPI requires some userspace user, but according to possibility
of turning off flat-ccs in BIOS I think UMDs will be interested to
examine of this flag. Generally this is chicken-and-egg problem -
igts require changes in the kernel which in turn requires userspace
user (which at the moment doesn't exist as this uapi is new).
We introduced some auxiliary files in igt (see i915_drm_local.h or
i915_pciids_local.h) to put necessary definitions there allowing
igts to compile. And when kernel change is merged updating uapi
along with removal of this temporary definitions from "local" files.
But to avoid double work I would just wait for Xe maintainers
opinion about new UAPI. I guess they will ack it and this flag
will be exposed.
--
Zbigniew
>
> -- Akshata
>
> > > #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2
> > > #define DRM_XE_QUERY_CONFIG_VA_BITS 3
> > > #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4
> > > --
> > > 2.34.1
> > >
More information about the igt-dev
mailing list