panfrost: Sync panfrost_drm.h from drm-misc-next

Updated from changes in commit 730c2bf4ad39 ("drm/panfrost: Add support for
devcoredump").

From drm-misc/drm-misc-next.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
This commit is contained in:
Adrián Larumbe
2022-08-11 18:07:46 +01:00
committed by Marge Bot
parent 6f4f11cf70
commit 6a4532cbab

View File

@@ -84,14 +84,14 @@ struct drm_panfrost_wait_bo {
__s64 timeout_ns; /* absolute */ __s64 timeout_ns; /* absolute */
}; };
/* Valid flags to pass to drm_panfrost_create_bo */
#define PANFROST_BO_NOEXEC 1 #define PANFROST_BO_NOEXEC 1
#define PANFROST_BO_HEAP 2 #define PANFROST_BO_HEAP 2
/** /**
* struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs. * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
* *
* There are currently no values for the flags argument, but it may be * The flags argument is a bit mask of PANFROST_BO_* flags.
* used in a future extension.
*/ */
struct drm_panfrost_create_bo { struct drm_panfrost_create_bo {
__u32 size; __u32 size;
@@ -224,6 +224,53 @@ struct drm_panfrost_madvise {
__u32 retained; /* out, whether backing store still exists */ __u32 retained; /* out, whether backing store still exists */
}; };
/* Definitions for coredump decoding in user space */
#define PANFROSTDUMP_MAJOR 1
#define PANFROSTDUMP_MINOR 0
#define PANFROSTDUMP_MAGIC 0x464E4150 /* PANF */
#define PANFROSTDUMP_BUF_REG 0
#define PANFROSTDUMP_BUF_BOMAP (PANFROSTDUMP_BUF_REG + 1)
#define PANFROSTDUMP_BUF_BO (PANFROSTDUMP_BUF_BOMAP + 1)
#define PANFROSTDUMP_BUF_TRAILER (PANFROSTDUMP_BUF_BO + 1)
struct panfrost_dump_object_header {
__le32 magic;
__le32 type;
__le32 file_size;
__le32 file_offset;
union {
struct pan_reg_hdr {
__le64 jc;
__le32 gpu_id;
__le32 major;
__le32 minor;
__le64 nbos;
} reghdr;
struct pan_bomap_hdr {
__le32 valid;
__le64 iova;
__le32 data[2];
} bomap;
/*
* Force same size in case we want to expand the header
* with new fields and also keep it 512-byte aligned
*/
__le32 sizer[496];
};
};
/* Registers object, an array of these */
struct panfrost_dump_registers {
__le32 reg;
__le32 value;
};
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif