On Thu, 15 May 2025, at 3:07 AM, Maxime Ripard wrote:
> On Sun, May 11, 2025 at 10:31:19PM +1200, Ryan Walklin wrote:

>> +enum sun8i_mixer_type {
>> +    sun8i_mixer_de2,
>> +    sun8i_mixer_de3,
>> +    sun8i_mixer_de33,
>> +};
>
> enum variants typically have their name in upper-case.

Ah of course, will correct, thanks.

> With that fixed,
> Acked-by: Maxime Ripard <mrip...@kernel.org>
>
> Maxime

Thanks for the review! Will submit a v11 with the enum fixed and without the 
clock bits Chen-Yu has already picked up.

Regards,

Ryan

>
>>  /**
>>   * struct sun8i_mixer_cfg - mixer HW configuration
>>   * @vi_num: number of VI channels
>> @@ -171,8 +180,9 @@ struct sun8i_mixer_cfg {
>>      int             scaler_mask;
>>      int             ccsc;
>>      unsigned long   mod_rate;
>> -    unsigned int    is_de3 : 1;
>> +    unsigned int    de_type;
>>      unsigned int    scanline_yuv;
>> +    unsigned int    map[6];
>>  };
>>  
>>  struct sun8i_mixer {
>> @@ -184,6 +194,9 @@ struct sun8i_mixer {
>>  
>>      struct clk                      *bus_clk;
>>      struct clk                      *mod_clk;
>> +
>> +    struct regmap                   *top_regs;
>> +    struct regmap                   *disp_regs;
>>  };
>>  
>>  enum {
>> @@ -220,13 +233,16 @@ sun8i_blender_base(struct sun8i_mixer *mixer)
>>  static inline struct regmap *
>>  sun8i_blender_regmap(struct sun8i_mixer *mixer)
>>  {
>> -    return mixer->engine.regs;
>> +    return mixer->cfg->de_type == sun8i_mixer_de33 ?
>> +            mixer->disp_regs : mixer->engine.regs;
>>  }
>>  
>>  static inline u32
>>  sun8i_channel_base(struct sun8i_mixer *mixer, int channel)
>>  {
>> -    if (mixer->cfg->is_de3)
>> +    if (mixer->cfg->de_type == sun8i_mixer_de33)
>> +            return mixer->cfg->map[channel] * 0x20000 + DE2_CH_SIZE;
>> +    else if (mixer->cfg->de_type == sun8i_mixer_de3)
>>              return DE3_CH_BASE + channel * DE3_CH_SIZE;
>>      else
>>              return DE2_CH_BASE + channel * DE2_CH_SIZE;
>> -- 
>> 2.49.0
>> 
>
> Attachments:
> * signature.asc

Reply via email to