Re: [PATCH 09/64] drm/simple: Introduce drmm_simple_encoder_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jun 20, 2022 at 12:44:24PM +0200, Thomas Zimmermann wrote:
> Am 10.06.22 um 11:28 schrieb Maxime Ripard:
> > The DRM-managed function to register an encoder is
> > drmm_simple_encoder_alloc() and its variants, which will allocate the
> > underlying structure and initialisation the encoder.
> > 
> > However, we might want to separate the structure creation and the encoder
> > initialisation, for example if the structure is shared across multiple DRM
> > entities, for example an encoder and a connector.
> > 
> > Let's create an helper to only initialise an encoder that would be passed
> > as an argument.
> > 
> 
> There's nothing wrong with this patch, but I have to admit that adding
> drm_simple_encoder_init() et al was a mistake.

Why do you think it was a mistake?

> It would have been better to add an initializer macro like
> 
> #define DRM_STATIC_ENCODER_DEFAULT_FUNCS \
>   .destroy = drm_encoder_cleanup
> 
> It's way more flexible and similarly easy to use. Anyway...

We can still have this. It would simplify this series so I could
definitely squeeze that patch in and add a TODO item / deprecation
notice for simple encoders if you think it's needed

Maxime

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux