drm/xe/gsc: Add status check during gsc header readout
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Suraj Kandpal
Before checking if data is present in the message reply check the status in header and see if it indicates any error.
--v2
- Usedrm_err()instead ofdrm_dbg_kms()[Daniele]Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>Reviewed-by Daniele Ceraolo Spurio <[email protected]>--- drivers/gpu/drm/xe/xe_gsc_submit.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/xe/xe_gsc_submit.c +0
-0@@ -125,11 +125,18 @@ int xe_gsc_read_out_header(struct xe_device *xe, {
drivers/gpu/drm/xe/xe_gsc_submit.c int xe_gsc_read_out_header(struct xe_device *xe, · line 135
Quoted 10 lines
drivers/gpu/drm/xe/xe_gsc_submit.c +3
-0u32 marker =mtl_gsc_header_rd (xe, map, offset, validity_marker);u32 size =mtl_gsc_header_rd (xe, map, offset, message_size); +u32 status =mtl_gsc_header_rd (xe, map, offset, status);u32 payload_size = size -GSC_HDR_SIZE ;if (marker !=GSC_HECI_VALIDITY_MARKER )return -EPROTO ; +if (status !=0 ) { + drm_err(xe, "GSC header readout indicates error: %d\n",
Sorry I didn't notice it in the first rev, but this should be &xe->drm and not just xe. Note that since drm is the first thing inside the xe structure, a pointer to the xe structure also points to xe->drm, so it still works like this, but it isn't clean.
Daniele
Quoted 7 lines
drivers/gpu/drm/xe/xe_gsc_submit.c +4
-0+ status); +return -EINVAL ; + } +if (size <GSC_HDR_SIZE || payload_size < min_payload_size)return -ENODATA ;
Quoted 28 lines · Daniele Ceraolo Spurio
Quoted 27 lines · Suraj Kandpal
Before checking if data is present in the message reply check the status in header and see if it indicates any error.
--v2
- Usedrm_err()instead ofdrm_dbg_kms()[Daniele]Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>Reviewed-by Daniele Ceraolo Spurio <[email protected]>--- drivers/gpu/drm/xe/xe_gsc_submit.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/xe/xe_gsc_submit.c +1
-0@@ -125,11 +125,18 @@ int xe_gsc_read_out_header(struct xe_device *xe, {u32 marker =mtl_gsc_header_rd (xe, map, offset, validity_marker);u32 size =mtl_gsc_header_rd (xe, map, offset, message_size); +u32 status =mtl_gsc_header_rd (xe, map, offset, status);u32 payload_size = size -GSC_HDR_SIZE ;if (marker !=GSC_HECI_VALIDITY_MARKER )return -EPROTO ;
Quoted 7 lines
drivers/gpu/drm/xe/xe_gsc_submit.c int xe_gsc_read_out_header(struct xe_device *xe, · line 135
Quoted 2 lines
drivers/gpu/drm/xe/xe_gsc_submit.c +2
-0+if (status !=0 ) { + drm_err(xe, "GSC header readout indicates error: %d\n",Sorry I didn't notice it in the first rev, but this should be
&xe->drmand not just xe. Note that since drm is the first thing inside the xe structure, a pointer to the xe structure also points toxe->drm, so it still works like this, but it isn't clean.
Does it actually build? There's no xe->dev member. See the definitions of drm_err and __drm_printk.
Btw Suraj's messages didn't get through to the list, and thus CI wasn't triggered.
BR,
Jani.
Quoted 11 lines
Daniele
Quoted 7 lines
drivers/gpu/drm/xe/xe_gsc_submit.c +4
-0+ status); +return -EINVAL ; + } +if (size <GSC_HDR_SIZE || payload_size < min_payload_size)return -ENODATA ;
Signature · 1 line
Jani Nikula, Intel