Re: [PATCH v8 1/3] media: qcom: camss: Add common TPG support

From: Konrad Dybcio

Date: Wed Jan 14 2026 - 04:43:35 EST


On 1/14/26 6:05 AM, Vladimir Zapolskiy wrote:
> Hi Wenmeng.
>
> On 1/14/26 05:04, Wenmeng Liu wrote:
>> Hi Vladimir,

[...]

>>>> +const char * const testgen_payload_modes[] = {
>>>> +    "Disabled",
>>>> +    "Incrementing",
>>>> +    "Alternating 0x55/0xAA",
>>>> +    "Reserved",
>>>> +    "Reserved",
>>>> +    "Pseudo-random Data",
>>>> +    "User Specified",
>>>> +    "Reserved",
>>>> +    "Reserved",
>>>> +    "Color bars",
>>>> +    "Reserved"
>>>
>>> It makes little sense to mention the unsupported values, and then
>>> introduce enum tpg_testgen_mode to list the supported ones.
>>>
>> This is for ctrl menu, will do as follow:
>> static const char * const testgen_payload_modes[] = {
>>       [TPG_PAYLOAD_MODE_DISABLED]          = "Disabled",
>>       [TPG_PAYLOAD_MODE_INCREMENTING]      = "Incrementing",
>>       [TPG_PAYLOAD_MODE_ALTERNATING_55_AA]       = "Alternating 0x55/0xAA",
>>       [TPG_PAYLOAD_MODE_RANDOM]      = "Pseudo-random Data",
>>       [TPG_PAYLOAD_MODE_USER_SPECIFIED]    = "User Specified",
>>       [TPG_PAYLOAD_MODE_COLOR_BARS]        = "Color bars",
>> };
>>
>
> This is also not perfect, still userspace is misinformed about a number
> of possible TPG modes vs. a number of actually supported TPG modes.

If the values are really reserved (i.e. don't do anything (useful) today),
let's just throw an -EOPNOTSUPP if selected

Konrad