Re: [RFC 5/7] drm/omap: Do dss_device (display) ordering in omap_drv.c

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

 



Hi Peter,

On Monday, 4 September 2017 12:26:08 EEST Peter Ujfalusi wrote:
> On 2017-09-01 14:32, Laurent Pinchart wrote:
> >> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> >> b/drivers/gpu/drm/omapdrm/omap_drv.c index 32dc0e88220f..0e100a359d26
> >> 100644
> >> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> >> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> >> @@ -18,6 +18,8 @@
> >> 
> >>   */
> >>  
> >>  #include <linux/sys_soc.h>
> >> 
> >> +#include <linux/sort.h>
> >> +#include <linux/of.h>
> > 
> > Please keep this list alphabetically sorted.
> 
> OK.
> 
> >>  #include <drm/drm_atomic.h>
> >>  #include <drm/drm_atomic_helper.h>
> >> 
> >> @@ -162,6 +164,22 @@ static void omap_disconnect_dssdevs(struct
> >> drm_device
> >> *ddev) priv->num_dssdevs = 0;
> >> 
> >>  }
> >> 
> >> +static int omap_compare_dssdevs(const void *a, const void *b)
> >> +{
> >> +	const struct omap_dss_device *dssdev1 = *(struct omap_dss_device **)a;
> >> +	const struct omap_dss_device *dssdev2 = *(struct omap_dss_device **)b;
> >> +	int  id1, id2;
> >> +
> >> +	id1 = of_alias_get_id(dssdev1->dev->of_node, "display");
> >> +	id2 = of_alias_get_id(dssdev2->dev->of_node, "display");
> > 
> > Getting the alias id is a bit costly, how about caching them ?
> 
> This is going to be done once and the ID will be never used after this.
> We could add the ID to 'struct omap_dss_device' and initialize it in
> omapdss_register_display, if that's what you are referring to.

Yes, that's what I meant.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[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