* [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <1519809663-25339-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> @ 2018-02-28 9:33 ` S, Shirish [not found] ` <BN6PR12MB1826A7CC70B786648E00B387F2C70-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: S, Shirish @ 2018-02-28 9:33 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Deucher, Alexander, Wentland, Harry From: Shirish S <shirish.s@amd.com> Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to complement "for_each_oldnew_plane_in_state" way of reading plane states. The plane states are required to be read in reverse order for amdgpu, as the z order convention followed in linux is opposite to how the planes are supposed to be presented to DC engine, which is in common to both windows and linux. Signed-off-by: Shirish S <shirish.s@amd.com> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> --- include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index cf13842..b947930 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (new_plane_state) = (__state)->planes[__i].new_state, 1)) /** + * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic + * update in reverse order + * @__state: &struct drm_atomic_state pointer + * @plane: &struct drm_plane iteration cursor + * @old_plane_state: &struct drm_plane_state iteration cursor for the old state + * @new_plane_state: &struct drm_plane_state iteration cursor for the new state + * @__i: int iteration cursor, for macro-internal use + * + * This iterates over all planes in an atomic update in reverse order, + * tracking both old and new state. This is useful in places where the + * state delta needs to be considered, for example in atomic check functions. + */ +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ + (__i) >= 0; \ + (__i)--) \ + for_each_if ((__state)->planes[__i].ptr && \ + ((plane) = (__state)->planes[__i].ptr, \ + (old_plane_state) = (__state)->planes[__i].old_state,\ + (new_plane_state) = (__state)->planes[__i].new_state, 1))) + +/** * for_each_old_plane_in_state - iterate over all planes in an atomic update * @__state: &struct drm_atomic_state pointer * @plane: &struct drm_plane iteration cursor -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <BN6PR12MB1826A7CC70B786648E00B387F2C70-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <BN6PR12MB1826A7CC70B786648E00B387F2C70-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2018-02-28 13:49 ` Andrey Grodzovsky 2018-02-28 14:26 ` Alex Deucher 1 sibling, 0 replies; 7+ messages in thread From: Andrey Grodzovsky @ 2018-02-28 13:49 UTC (permalink / raw) To: S, Shirish, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Deucher, Alexander, Wentland, Harry Any DRM related changes needs to be sent to dri-devel@lists.freedesktop.org Andrey On 02/28/2018 04:33 AM, S, Shirish wrote: > From: Shirish S <shirish.s@amd.com> > > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to > complement "for_each_oldnew_plane_in_state" way of reading plane > states. > > The plane states are required to be read in reverse order for > amdgpu, as the z order convention followed in linux is > opposite to how the planes are supposed to be presented to DC > engine, which is in common to both windows and linux. > > Signed-off-by: Shirish S <shirish.s@amd.com> > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> > --- > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > index cf13842..b947930 100644 > --- a/include/drm/drm_atomic.h > +++ b/include/drm/drm_atomic.h > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); > (new_plane_state) = (__state)->planes[__i].new_state, 1)) > > /** > + * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic > + * update in reverse order > + * @__state: &struct drm_atomic_state pointer > + * @plane: &struct drm_plane iteration cursor > + * @old_plane_state: &struct drm_plane_state iteration cursor for the old state > + * @new_plane_state: &struct drm_plane_state iteration cursor for the new state > + * @__i: int iteration cursor, for macro-internal use > + * > + * This iterates over all planes in an atomic update in reverse order, > + * tracking both old and new state. This is useful in places where the > + * state delta needs to be considered, for example in atomic check functions. > + */ > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ > + (__i) >= 0; \ > + (__i)--) \ > + for_each_if ((__state)->planes[__i].ptr && \ > + ((plane) = (__state)->planes[__i].ptr, \ > + (old_plane_state) = (__state)->planes[__i].old_state,\ > + (new_plane_state) = (__state)->planes[__i].new_state, 1))) > + > +/** > * for_each_old_plane_in_state - iterate over all planes in an atomic update > * @__state: &struct drm_atomic_state pointer > * @plane: &struct drm_plane iteration cursor _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <BN6PR12MB1826A7CC70B786648E00B387F2C70-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 2018-02-28 13:49 ` Andrey Grodzovsky @ 2018-02-28 14:26 ` Alex Deucher [not found] ` <CADnq5_NYPTwH=Ro0eB=0fi0dBGMGbQD3Cm45vgZnZ3AhGNL21A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: Alex Deucher @ 2018-02-28 14:26 UTC (permalink / raw) To: S, Shirish, Maling list - DRI developers Cc: Deucher, Alexander, Wentland, Harry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW + dri-devel On Wed, Feb 28, 2018 at 4:33 AM, S, Shirish <Shirish.S@amd.com> wrote: > From: Shirish S <shirish.s@amd.com> > > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to > complement "for_each_oldnew_plane_in_state" way of reading plane > states. > > The plane states are required to be read in reverse order for > amdgpu, as the z order convention followed in linux is > opposite to how the planes are supposed to be presented to DC > engine, which is in common to both windows and linux. > > Signed-off-by: Shirish S <shirish.s@amd.com> > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> > --- > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > index cf13842..b947930 100644 > --- a/include/drm/drm_atomic.h > +++ b/include/drm/drm_atomic.h > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); > (new_plane_state) = (__state)->planes[__i].new_state, 1)) > > /** > + * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic > + * update in reverse order > + * @__state: &struct drm_atomic_state pointer > + * @plane: &struct drm_plane iteration cursor > + * @old_plane_state: &struct drm_plane_state iteration cursor for the old state > + * @new_plane_state: &struct drm_plane_state iteration cursor for the new state > + * @__i: int iteration cursor, for macro-internal use > + * > + * This iterates over all planes in an atomic update in reverse order, > + * tracking both old and new state. This is useful in places where the > + * state delta needs to be considered, for example in atomic check functions. > + */ > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ > + (__i) >= 0; \ > + (__i)--) \ > + for_each_if ((__state)->planes[__i].ptr && \ > + ((plane) = (__state)->planes[__i].ptr, \ > + (old_plane_state) = (__state)->planes[__i].old_state,\ > + (new_plane_state) = (__state)->planes[__i].new_state, 1))) > + > +/** > * for_each_old_plane_in_state - iterate over all planes in an atomic update > * @__state: &struct drm_atomic_state pointer > * @plane: &struct drm_plane iteration cursor > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CADnq5_NYPTwH=Ro0eB=0fi0dBGMGbQD3Cm45vgZnZ3AhGNL21A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <CADnq5_NYPTwH=Ro0eB=0fi0dBGMGbQD3Cm45vgZnZ3AhGNL21A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-03-06 10:06 ` Daniel Vetter [not found] ` <BN6PR12MB17805C31305E2882EEDB245680D90@BN6PR12MB1780.namprd12.prod.outlook.com> 0 siblings, 1 reply; 7+ messages in thread From: Daniel Vetter @ 2018-03-06 10:06 UTC (permalink / raw) To: Alex Deucher Cc: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Maling list - DRI developers, S, Shirish On Wed, Feb 28, 2018 at 09:26:26AM -0500, Alex Deucher wrote: > + dri-devel > > > On Wed, Feb 28, 2018 at 4:33 AM, S, Shirish <Shirish.S@amd.com> wrote: > > From: Shirish S <shirish.s@amd.com> > > > > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to > > complement "for_each_oldnew_plane_in_state" way of reading plane > > states. > > > > The plane states are required to be read in reverse order for > > amdgpu, as the z order convention followed in linux is > > opposite to how the planes are supposed to be presented to DC > > engine, which is in common to both windows and linux. > > > > Signed-off-by: Shirish S <shirish.s@amd.com> > > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> Makes sense. > > --- > > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > > index cf13842..b947930 100644 > > --- a/include/drm/drm_atomic.h > > +++ b/include/drm/drm_atomic.h > > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); > > (new_plane_state) = (__state)->planes[__i].new_state, 1)) > > > > /** > > + * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic > > + * update in reverse order Are you sure this renders correctly in kernel-doc? Iirc you have to indent the continuation line. Assuming this is fixed: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > + * @__state: &struct drm_atomic_state pointer > > + * @plane: &struct drm_plane iteration cursor > > + * @old_plane_state: &struct drm_plane_state iteration cursor for the old state > > + * @new_plane_state: &struct drm_plane_state iteration cursor for the new state > > + * @__i: int iteration cursor, for macro-internal use > > + * > > + * This iterates over all planes in an atomic update in reverse order, > > + * tracking both old and new state. This is useful in places where the > > + * state delta needs to be considered, for example in atomic check functions. > > + */ > > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ > > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ > > + (__i) >= 0; \ > > + (__i)--) \ > > + for_each_if ((__state)->planes[__i].ptr && \ > > + ((plane) = (__state)->planes[__i].ptr, \ > > + (old_plane_state) = (__state)->planes[__i].old_state,\ > > + (new_plane_state) = (__state)->planes[__i].new_state, 1))) > > + > > +/** > > * for_each_old_plane_in_state - iterate over all planes in an atomic update > > * @__state: &struct drm_atomic_state pointer > > * @plane: &struct drm_plane iteration cursor > > -- > > 2.7.4 > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <BN6PR12MB17805C31305E2882EEDB245680D90@BN6PR12MB1780.namprd12.prod.outlook.com>]
* RE: [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <BN6PR12MB17805C31305E2882EEDB245680D90@BN6PR12MB1780.namprd12.prod.outlook.com> @ 2018-03-06 14:52 ` Vishwakarma, Pratik 2018-03-06 17:31 ` Alex Deucher 1 sibling, 0 replies; 7+ messages in thread From: Vishwakarma, Pratik @ 2018-03-06 14:52 UTC (permalink / raw) To: Daniel Vetter, Alex Deucher Cc: Deucher, Alexander, Maling list - DRI developers, amd-gfx, S, Shirish Below mail was rejected, maybe due to attachment. Sending again without attachment. Regards Pratik -----Original Message----- From: Vishwakarma, Pratik Sent: Tuesday, March 6, 2018 4:22 PM To: 'Daniel Vetter' <daniel@ffwll.ch>; Alex Deucher <alexdeucher@gmail.com> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; Maling list - DRI developers <dri-devel@lists.freedesktop.org>; S, Shirish <Shirish.S@amd.com> Subject: RE: [PATCH] drm/atomic: Add new reverse iterator over all plane state Hi Daniel, I have checked make htmldocs on v2 of this patch. I have attached output drm-kms.html on that thread. No indentation issue is observed. Attached again for reference. Can you please provide RB on that? Regards Pratik -----Original Message----- From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Daniel Vetter Sent: Tuesday, March 6, 2018 3:36 PM To: Alex Deucher <alexdeucher@gmail.com> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; Maling list - DRI developers <dri-devel@lists.freedesktop.org>; S, Shirish <Shirish.S@amd.com> Subject: Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state On Wed, Feb 28, 2018 at 09:26:26AM -0500, Alex Deucher wrote: > + dri-devel > > > On Wed, Feb 28, 2018 at 4:33 AM, S, Shirish <Shirish.S@amd.com> wrote: > > From: Shirish S <shirish.s@amd.com> > > > > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to > > complement "for_each_oldnew_plane_in_state" way of reading plane > > states. > > > > The plane states are required to be read in reverse order for > > amdgpu, as the z order convention followed in linux is opposite to > > how the planes are supposed to be presented to DC engine, which is > > in common to both windows and linux. > > > > Signed-off-by: Shirish S <shirish.s@amd.com> > > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> Makes sense. > > --- > > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > > index cf13842..b947930 100644 > > --- a/include/drm/drm_atomic.h > > +++ b/include/drm/drm_atomic.h > > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); > > (new_plane_state) = > > (__state)->planes[__i].new_state, 1)) > > > > /** > > + * for_each_oldnew_plane_in_state_reverse - iterate over all planes > > + in an atomic > > + * update in reverse order Are you sure this renders correctly in kernel-doc? Iirc you have to indent the continuation line. Assuming this is fixed: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > + * @__state: &struct drm_atomic_state pointer > > + * @plane: &struct drm_plane iteration cursor > > + * @old_plane_state: &struct drm_plane_state iteration cursor for > > +the old state > > + * @new_plane_state: &struct drm_plane_state iteration cursor for > > +the new state > > + * @__i: int iteration cursor, for macro-internal use > > + * > > + * This iterates over all planes in an atomic update in reverse > > +order, > > + * tracking both old and new state. This is useful in places where > > +the > > + * state delta needs to be considered, for example in atomic check functions. > > + */ > > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ > > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ > > + (__i) >= 0; \ > > + (__i)--) \ > > + for_each_if ((__state)->planes[__i].ptr && \ > > + ((plane) = (__state)->planes[__i].ptr, \ > > + (old_plane_state) = (__state)->planes[__i].old_state,\ > > + (new_plane_state) = > > +(__state)->planes[__i].new_state, 1))) > > + > > +/** > > * for_each_old_plane_in_state - iterate over all planes in an atomic update > > * @__state: &struct drm_atomic_state pointer > > * @plane: &struct drm_plane iteration cursor > > -- > > 2.7.4 > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state [not found] ` <BN6PR12MB17805C31305E2882EEDB245680D90@BN6PR12MB1780.namprd12.prod.outlook.com> 2018-03-06 14:52 ` Vishwakarma, Pratik @ 2018-03-06 17:31 ` Alex Deucher 2018-03-07 3:11 ` S, Shirish 1 sibling, 1 reply; 7+ messages in thread From: Alex Deucher @ 2018-03-06 17:31 UTC (permalink / raw) To: Vishwakarma, Pratik Cc: Deucher, Alexander, Maling list - DRI developers, amd-gfx, S, Shirish On Tue, Mar 6, 2018 at 5:52 AM, Vishwakarma, Pratik <Pratik.Vishwakarma@amd.com> wrote: > Hi Daniel, > > I have checked make htmldocs on v2 of this patch. I have attached output drm-kms.html on that thread. > No indentation issue is observed. Attached again for reference. > Can you please provide RB on that? How did you send the patch? I can't get V2 to apply. The patch is mangled. Please use git-send-email if you didn't before. Alex > > Regards > Pratik > > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Daniel Vetter > Sent: Tuesday, March 6, 2018 3:36 PM > To: Alex Deucher <alexdeucher@gmail.com> > Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; Maling list - DRI developers <dri-devel@lists.freedesktop.org>; S, Shirish <Shirish.S@amd.com> > Subject: Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state > > On Wed, Feb 28, 2018 at 09:26:26AM -0500, Alex Deucher wrote: >> + dri-devel >> >> >> On Wed, Feb 28, 2018 at 4:33 AM, S, Shirish <Shirish.S@amd.com> wrote: >> > From: Shirish S <shirish.s@amd.com> >> > >> > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to >> > complement "for_each_oldnew_plane_in_state" way of reading plane >> > states. >> > >> > The plane states are required to be read in reverse order for >> > amdgpu, as the z order convention followed in linux is opposite to >> > how the planes are supposed to be presented to DC engine, which is >> > in common to both windows and linux. >> > >> > Signed-off-by: Shirish S <shirish.s@amd.com> >> > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> > > Makes sense. >> > --- >> > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ >> > 1 file changed, 22 insertions(+) >> > >> > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h >> > index cf13842..b947930 100644 >> > --- a/include/drm/drm_atomic.h >> > +++ b/include/drm/drm_atomic.h >> > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); >> > (new_plane_state) = >> > (__state)->planes[__i].new_state, 1)) >> > >> > /** >> > + * for_each_oldnew_plane_in_state_reverse - iterate over all planes >> > + in an atomic >> > + * update in reverse order > > Are you sure this renders correctly in kernel-doc? Iirc you have to indent the continuation line. > > Assuming this is fixed: > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > >> > + * @__state: &struct drm_atomic_state pointer >> > + * @plane: &struct drm_plane iteration cursor >> > + * @old_plane_state: &struct drm_plane_state iteration cursor for >> > +the old state >> > + * @new_plane_state: &struct drm_plane_state iteration cursor for >> > +the new state >> > + * @__i: int iteration cursor, for macro-internal use >> > + * >> > + * This iterates over all planes in an atomic update in reverse >> > +order, >> > + * tracking both old and new state. This is useful in places where >> > +the >> > + * state delta needs to be considered, for example in atomic check functions. >> > + */ >> > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ >> > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ >> > + (__i) >= 0; \ >> > + (__i)--) \ >> > + for_each_if ((__state)->planes[__i].ptr && \ >> > + ((plane) = (__state)->planes[__i].ptr, \ >> > + (old_plane_state) = (__state)->planes[__i].old_state,\ >> > + (new_plane_state) = >> > +(__state)->planes[__i].new_state, 1))) >> > + >> > +/** >> > * for_each_old_plane_in_state - iterate over all planes in an atomic update >> > * @__state: &struct drm_atomic_state pointer >> > * @plane: &struct drm_plane iteration cursor >> > -- >> > 2.7.4 >> > >> > _______________________________________________ >> > amd-gfx mailing list >> > amd-gfx@lists.freedesktop.org >> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/atomic: Add new reverse iterator over all plane state 2018-03-06 17:31 ` Alex Deucher @ 2018-03-07 3:11 ` S, Shirish 0 siblings, 0 replies; 7+ messages in thread From: S, Shirish @ 2018-03-07 3:11 UTC (permalink / raw) To: Alex Deucher, Vishwakarma, Pratik Cc: Deucher, Alexander, Maling list - DRI developers, amd-gfx Hi Alex, Have resent the V2 with R-B of Daniel. Regards, Shirish S -----Original Message----- From: Alex Deucher [mailto:alexdeucher@gmail.com] Sent: Tuesday, March 6, 2018 11:01 PM To: Vishwakarma, Pratik <Pratik.Vishwakarma@amd.com> Cc: Daniel Vetter <daniel@ffwll.ch>; Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org; Maling list - DRI developers <dri-devel@lists.freedesktop.org>; S, Shirish <Shirish.S@amd.com> Subject: Re: [PATCH] drm/atomic: Add new reverse iterator over all plane state On Tue, Mar 6, 2018 at 5:52 AM, Vishwakarma, Pratik <Pratik.Vishwakarma@amd.com> wrote: > Hi Daniel, > > I have checked make htmldocs on v2 of this patch. I have attached output drm-kms.html on that thread. > No indentation issue is observed. Attached again for reference. > Can you please provide RB on that? How did you send the patch? I can't get V2 to apply. The patch is mangled. Please use git-send-email if you didn't before. Alex > > Regards > Pratik > > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Daniel Vetter > Sent: Tuesday, March 6, 2018 3:36 PM > To: Alex Deucher <alexdeucher@gmail.com> > Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; > amd-gfx@lists.freedesktop.org; Maling list - DRI developers > <dri-devel@lists.freedesktop.org>; S, Shirish <Shirish.S@amd.com> > Subject: Re: [PATCH] drm/atomic: Add new reverse iterator over all > plane state > > On Wed, Feb 28, 2018 at 09:26:26AM -0500, Alex Deucher wrote: >> + dri-devel >> >> >> On Wed, Feb 28, 2018 at 4:33 AM, S, Shirish <Shirish.S@amd.com> wrote: >> > From: Shirish S <shirish.s@amd.com> >> > >> > Add reverse iterator "for_each_oldnew_plane_in_state_reverse" to >> > complement "for_each_oldnew_plane_in_state" way of reading plane >> > states. >> > >> > The plane states are required to be read in reverse order for >> > amdgpu, as the z order convention followed in linux is opposite to >> > how the planes are supposed to be presented to DC engine, which is >> > in common to both windows and linux. >> > >> > Signed-off-by: Shirish S <shirish.s@amd.com> >> > Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com> > > Makes sense. >> > --- >> > include/drm/drm_atomic.h | 22 ++++++++++++++++++++++ >> > 1 file changed, 22 insertions(+) >> > >> > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h >> > index cf13842..b947930 100644 >> > --- a/include/drm/drm_atomic.h >> > +++ b/include/drm/drm_atomic.h >> > @@ -754,6 +754,28 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); >> > (new_plane_state) = >> > (__state)->planes[__i].new_state, 1)) >> > >> > /** >> > + * for_each_oldnew_plane_in_state_reverse - iterate over all >> > + planes in an atomic >> > + * update in reverse order > > Are you sure this renders correctly in kernel-doc? Iirc you have to indent the continuation line. > > Assuming this is fixed: > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > >> > + * @__state: &struct drm_atomic_state pointer >> > + * @plane: &struct drm_plane iteration cursor >> > + * @old_plane_state: &struct drm_plane_state iteration cursor for >> > +the old state >> > + * @new_plane_state: &struct drm_plane_state iteration cursor for >> > +the new state >> > + * @__i: int iteration cursor, for macro-internal use >> > + * >> > + * This iterates over all planes in an atomic update in reverse >> > +order, >> > + * tracking both old and new state. This is useful in places >> > +where the >> > + * state delta needs to be considered, for example in atomic check functions. >> > + */ >> > +#define for_each_oldnew_plane_in_state_reverse(__state, plane, old_plane_state, new_plane_state, __i) \ >> > + (for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \ >> > + (__i) >= 0; \ >> > + (__i)--) \ >> > + for_each_if ((__state)->planes[__i].ptr && \ >> > + ((plane) = (__state)->planes[__i].ptr, \ >> > + (old_plane_state) = (__state)->planes[__i].old_state,\ >> > + (new_plane_state) = >> > +(__state)->planes[__i].new_state, 1))) >> > + >> > +/** >> > * for_each_old_plane_in_state - iterate over all planes in an atomic update >> > * @__state: &struct drm_atomic_state pointer >> > * @plane: &struct drm_plane iteration cursor >> > -- >> > 2.7.4 >> > >> > _______________________________________________ >> > amd-gfx mailing list >> > amd-gfx@lists.freedesktop.org >> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-03-07 3:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1519809663-25339-1-git-send-email-shirish.s@amd.com> [not found] ` <1519809663-25339-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> 2018-02-28 9:33 ` [PATCH] drm/atomic: Add new reverse iterator over all plane state S, Shirish [not found] ` <BN6PR12MB1826A7CC70B786648E00B387F2C70-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 2018-02-28 13:49 ` Andrey Grodzovsky 2018-02-28 14:26 ` Alex Deucher [not found] ` <CADnq5_NYPTwH=Ro0eB=0fi0dBGMGbQD3Cm45vgZnZ3AhGNL21A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-03-06 10:06 ` Daniel Vetter [not found] ` <BN6PR12MB17805C31305E2882EEDB245680D90@BN6PR12MB1780.namprd12.prod.outlook.com> 2018-03-06 14:52 ` Vishwakarma, Pratik 2018-03-06 17:31 ` Alex Deucher 2018-03-07 3:11 ` S, Shirish
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.