Hi, > -----Original Message----- > From: Hiremath, Vaibhav > Sent: Friday, July 23, 2010 10:54 AM > To: Taneja, Archit; tomi.valkeinen@xxxxxxxxx > Cc: linux-omap@xxxxxxxxxxxxxxx; Semwal, Sumit; Mittal, Mukund > Subject: RE: [PATCH 3/5] OMAP: DSS2: Add new overlay object > for Video3 pipeline > > <snap> > > struct overlay_cache_data *oc; > > struct manager_cache_data *mc; > > - const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); > > + const int num_ovls = MAX_DSS_OVERLAYS; > [Hiremath, Vaibhav] You may want to clean this up, since now > you have global definition MAX_DSS_OVERLAYS. > Applies to everywhere its being used. > > > const int num_mgrs = MAX_DSS_MANAGERS; > > int i; > > int r; > > @@ -1000,7 +1001,7 @@ void dss_setup_partial_planes(struct > > omap_dss_device *dssdev, { > > struct overlay_cache_data *oc; > > struct manager_cache_data *mc; > > - const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); > > + const int num_ovls = MAX_DSS_OVERLAYS; > [Hiremath, Vaibhav] Ditto. > > > struct omap_overlay_manager *mgr; > > int i; > > u16 x, y, w, h; > > @@ -1132,7 +1133,7 @@ void dss_start_update(struct omap_dss_device > > *dssdev) { > > struct manager_cache_data *mc; > > struct overlay_cache_data *oc; > > - const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); > > + const int num_ovls = MAX_DSS_OVERLAYS; > [Hiremath, Vaibhav] Ditto. > > > const int num_mgrs = MAX_DSS_MANAGERS; > > struct omap_overlay_manager *mgr; > > int i; > > @@ -1162,8 +1163,8 @@ static void dss_apply_irq_handler(void *data, > > u32 > > mask) > > { > > struct manager_cache_data *mc; > > struct overlay_cache_data *oc; > > - const int num_ovls = ARRAY_SIZE(dss_cache.overlay_cache); > > - const int num_mgrs = ARRAY_SIZE(dss_cache.manager_cache); > > + const int num_ovls = MAX_DSS_OVERLAYS; > > + const int num_mgrs = MAX_DSS_MANAGERS; > > int i, r; > > bool mgr_busy[MAX_DSS_MANAGERS]; > > > > diff --git a/drivers/video/omap2/dss/overlay.c > > b/drivers/video/omap2/dss/overlay.c > > index 29aa157..2f8f89c > > --- a/drivers/video/omap2/dss/overlay.c > > +++ b/drivers/video/omap2/dss/overlay.c > > @@ -36,6 +36,8 @@ > > > > #include "dss.h" > > > > +#define MAX_DSS_OVERLAYS (cpu_is_omap44xx() ? 4 : 3) > > + > > [Hiremath, Vaibhav] Since this definition is being used in > multiple file, consider moving this to dss.h file so that we > have one place to see/modify in the future. > > Thanks, > Vaibhav > Thanks for the comments, I will incorporate the following changes: -remove const int num_mgrs and num_ovls variables as they are replaced by the new globals everywhere. -shift the MAX_DSS_OVERLAYS and MAX_DSS_MANAGERS to dss.h Archit -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html