mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 20:42:33 -04:00
The version is obtained via a dedicated MKHI GSC HECI command. The compatibility version is what we want to match against for the GSC, so we need to call the FW version checker after obtaining the version. Since this is the first time we send a GSC HECI command via the GSCCS, this patch also introduces common infrastructure to send such commands to the GSC. Communication with the GSC FW is done via input/output buffers, whose addresses are provided via a GSCCS command. The buffers contain a generic header and a client-specific packet (e.g. PXP, HDCP); the clients don't care about the header format and/or the GSCCS command in the batch, they only care about their client-specific header. This patch therefore introduces helpers that allow the callers to automatically fill in the input header, submit the GSCCS job and decode the output header, to make it so that the caller only needs to worry about their client-specific input and output messages. v3: squash of 2 separate patches ahead of merge, so that the common functions and their first user are added at the same time Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.Com> #v1 Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
40 lines
748 B
C
40 lines
748 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _ABI_GSC_MKHI_COMMANDS_ABI_H
|
|
#define _ABI_GSC_MKHI_COMMANDS_ABI_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* Heci client ID for MKHI commands */
|
|
#define HECI_MEADDRESS_MKHI 7
|
|
|
|
/* Generic MKHI header */
|
|
struct gsc_mkhi_header {
|
|
u8 group_id;
|
|
u8 command;
|
|
u8 reserved;
|
|
u8 result;
|
|
} __packed;
|
|
|
|
/* GFX_SRV commands */
|
|
#define MKHI_GROUP_ID_GFX_SRV 0x30
|
|
|
|
#define MKHI_GFX_SRV_GET_HOST_COMPATIBILITY_VERSION (0x42)
|
|
|
|
struct gsc_get_compatibility_version_in {
|
|
struct gsc_mkhi_header header;
|
|
} __packed;
|
|
|
|
struct gsc_get_compatibility_version_out {
|
|
struct gsc_mkhi_header header;
|
|
u16 proj_major;
|
|
u16 compat_major;
|
|
u16 compat_minor;
|
|
u16 reserved[5];
|
|
} __packed;
|
|
|
|
#endif
|