[PATCH v2 3/3] drm: mali-dp: Set encoder possible_clones
Sean Paul
seanpaul at chromium.org
Fri Jul 13 15:47:33 UTC 2018
On Fri, Jul 13, 2018 at 11:40:13AM -0400, Sean Paul wrote:
> On Fri, Jul 13, 2018 at 04:11:00PM +0100, Alexandru Gheorghe wrote:
> > Set possible_clones field to report that the writeback connector and
> > the one driving the display could be enabled at the same time.
> >
>
> In future, please include a "Changes in vX" section so it's easier to tell
> what's changed.
>
> > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
> > ---
> > drivers/gpu/drm/arm/malidp_drv.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> > index 5b72605..08b5bb2 100644
> > --- a/drivers/gpu/drm/arm/malidp_drv.c
> > +++ b/drivers/gpu/drm/arm/malidp_drv.c
> > @@ -616,6 +616,7 @@ static int malidp_bind(struct device *dev)
> > struct malidp_hw_device *hwdev;
> > struct platform_device *pdev = to_platform_device(dev);
> > struct of_device_id const *dev_id;
> > + struct drm_encoder *encoder;
> > /* number of lines for the R, G and B output */
> > u8 output_width[MAX_OUTPUT_CHANNELS];
> > int ret = 0, i;
> > @@ -737,6 +738,15 @@ static int malidp_bind(struct device *dev)
> > goto bind_fail;
> > }
> >
> > + /* We expect to have a maximum of two encoders one for the actual
Also, while I'm here, drop the comment contents a line. ie:
/*
* We expect...
*/
Ref: https://www.kernel.org/doc/html/v4.10/process/coding-style.html#commenting
Sean
> > + * display and a virtual one for the writeback connector
> > + */
> > + WARN_ON(drm->mode_config.num_encoder > 2);
> > + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
> > + encoder->possible_clones =
> > + (1 << drm->mode_config.num_encoder) - 1;
> > + }
>
> This loop isn't necessary, you can just do the assignment once instead of
> num_encoder times :-)
>
> Sean
>
> > +
> > ret = malidp_irq_init(pdev);
> > if (ret < 0)
> > goto irq_init_fail;
> > --
> > 2.7.4
> >
>
> --
> Sean Paul, Software Engineer, Google / Chromium OS
--
Sean Paul, Software Engineer, Google / Chromium OS
More information about the dri-devel
mailing list