Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/msm/dcp: decimal values prefixed with 0x in
  hfi_panel_dcs_command_type
--

commit d279d718168d7206eea3327b3e453bdfb0781ec8
Author: Jayant Shekhar <[email protected]>

drm/msm/dcp: Add HFI panel definitions

This commit adds HFI panel command IDs, property identifiers, and panel
configuration structures for DSI panel initialization and DCS transfers
through DCP firmware.

> diff --git a/drivers/gpu/drm/msm/dcp/hfi/hfi_defs_panel.h 
> b/drivers/gpu/drm/msm/dcp/hfi/hfi_defs_panel.h
> new file mode 100644
> index 0000000000000..a38d778898b2d
> --- /dev/null
> +++ b/drivers/gpu/drm/msm/dcp/hfi/hfi_defs_panel.h
[ ... ]
> +enum hfi_panel_dcs_command_type {
> +     HFI_DCS_CMD_PRE_ON                      = 0x00000000,
> +     HFI_DCS_CMD_ON                          = 0x00000001,
> +     HFI_DCS_CMD_VIDEO_ON                    = 0x00000002,
> +     HFI_DCS_CMD_COMMAND_ON                  = 0x00000003,
> +     HFI_DCS_CMD_POST_PANEL_ON               = 0x00000004,
> +     HFI_DCS_CMD_PRE_OFF                     = 0x00000005,
> +     HFI_DCS_CMD_OFF                         = 0x00000006,
> +     HFI_DCS_CMD_POST_OFF                    = 0x00000007,
> +     HFI_DCS_CMD_PRE_RES_SWITCH              = 0x00000008,
> +     HFI_DCS_CMD_RES_SWITCH                  = 0x0000009,
> +     HFI_DCS_CMD_POST_RES_SWITCH             = 0x00000010,
> +     HFI_DCS_CMD_VIDEO_MODE_SWITCH_INS       = 0x00000011,
> +     HFI_DCS_CMD_VIDEO_MODE_SWITCH_OUTS      = 0x00000012,
> +     HFI_DCS_CMD_COMMAND_MODE_SWITCH_INS     = 0x00000013,
> +     HFI_DCS_CMD_COMMAND_MODE_SWITCH_OUTS    = 0x00000014,
> +     HFI_DCS_CMD_PANEL_STATUS                = 0x00000015,
> +     HFI_DCS_CMD_LP1                         = 0x00000016,
> +     HFI_DCS_CMD_LP2                         = 0x00000017,
> +     HFI_DCS_CMD_NOLP                        = 0x00000018,
> +     HFI_DCS_CMD_PPS                         = 0x00000019,
> +     HFI_DCS_CMD_ROI                         = 0x00000020,
> +     HFI_DCS_CMD_TIMING_SWITCH               = 0x00000021,
> +     HFI_DCS_CMD_POST_MODE_SWITCH_ON         = 0x00000022,
> +     HFI_DCS_CMD_QSYNC_ONS                   = 0x00000023,
> +     HFI_DCS_CMD_QSYNC_OFFS                  = 0x00000024,
> +     HFI_DCS_CMD_MAX                         = 0x00000025
> +};

[Severity: Medium]
Were the decimal values 9 through 25 in enum hfi_panel_dcs_command_type
prefixed with 0x000000 by mistake?

This skips 0x0a..0x0f and 0x1a..0x1f, shifting every command ID from
HFI_DCS_CMD_POST_RES_SWITCH onward and setting HFI_DCS_CMD_MAX to 0x25
(37) instead of 0x19 (25).  Beyond sending wrong command IDs, sizing a
HFI_PROPERTY_PANEL_DCS_CMD_INFO array of struct
hfi_panel_dcs_cmd_buffer_info (8 u32 words each) by HFI_DCS_CMD_MAX would
produce 296 u32 words, overflowing the 8-bit word-count field in
HFI_PACK_KEY().

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=5

Reply via email to