* [cip-dev] [PATCH 4.19.y-cip 1/2] drm: Add drm_atomic_get_old/new_private_obj_state
@ 2020-08-13 8:39 Biju Das
2020-08-13 8:39 ` [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings Biju Das
0 siblings, 1 reply; 5+ messages in thread
From: Biju Das @ 2020-08-13 8:39 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek
Cc: Chris Paterson, Biju Das, Prabhakar Mahadev Lad
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
From: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
commit 9801a7eadf4cc29cdc90583a49f12decbb832ced upstream.
This pair of functions return the old/new private object state for the
given private_obj, or NULL if the private_obj is not part of the global
atomic state.
Reviewed-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
[removed changes in drivers/gpu/drm/drm_atomic.c, since the same changes
are already present as part of the commit 60b4667275b6]
---
include/drm/drm_atomic.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index c0b48e25a620..6329ed4af310 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -402,6 +402,12 @@ void drm_atomic_private_obj_fini(struct drm_private_obj *obj);
struct drm_private_state * __must_check
drm_atomic_get_private_obj_state(struct drm_atomic_state *state,
struct drm_private_obj *obj);
+struct drm_private_state *
+drm_atomic_get_old_private_obj_state(struct drm_atomic_state *state,
+ struct drm_private_obj *obj);
+struct drm_private_state *
+drm_atomic_get_new_private_obj_state(struct drm_atomic_state *state,
+ struct drm_private_obj *obj);
struct drm_connector *
drm_atomic_get_old_connector_for_encoder(struct drm_atomic_state *state,
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5119): https://lists.cip-project.org/g/cip-dev/message/5119
Mute This Topic: https://lists.cip-project.org/mt/76165488/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings
2020-08-13 8:39 [cip-dev] [PATCH 4.19.y-cip 1/2] drm: Add drm_atomic_get_old/new_private_obj_state Biju Das
@ 2020-08-13 8:39 ` Biju Das
2020-08-13 20:49 ` Pavel Machek
0 siblings, 1 reply; 5+ messages in thread
From: Biju Das @ 2020-08-13 8:39 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek
Cc: Chris Paterson, Biju Das, Prabhakar Mahadev Lad
[-- Attachment #1: Type: text/plain, Size: 4455 bytes --]
From: Benjamin Gaignard <benjamin.gaignard@st.com>
commit bf5d837a0a4ced7cc223befc9e76d4ad30697d27 upstream.
Few for_each macro set variables that are never used later which led
to generate unused-but-set-variable warnings.
Add (void)(foo) inside the macros to remove these warnings
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191008124254.2144-1-benjamin.gaignard@st.com
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
include/drm/drm_atomic.h | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 6329ed4af310..9042fdae9211 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -662,6 +662,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->connectors[__i].ptr && \
((connector) = (__state)->connectors[__i].ptr, \
+ (void)(connector) /* Only to avoid unused-but-set-variable warning */, \
(old_connector_state) = (__state)->connectors[__i].old_state, \
(new_connector_state) = (__state)->connectors[__i].new_state, 1))
@@ -683,6 +684,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->connectors[__i].ptr && \
((connector) = (__state)->connectors[__i].ptr, \
+ (void)(connector) /* Only to avoid unused-but-set-variable warning */, \
(old_connector_state) = (__state)->connectors[__i].old_state, 1))
/**
@@ -703,7 +705,9 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->connectors[__i].ptr && \
((connector) = (__state)->connectors[__i].ptr, \
- (new_connector_state) = (__state)->connectors[__i].new_state, 1))
+ (void)(connector) /* Only to avoid unused-but-set-variable warning */, \
+ (new_connector_state) = (__state)->connectors[__i].new_state, \
+ (void)(new_connector_state) /* Only to avoid unused-but-set-variable warning */, 1))
/**
* for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update
@@ -723,7 +727,9 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->crtcs[__i].ptr && \
((crtc) = (__state)->crtcs[__i].ptr, \
+ (void)(crtc) /* Only to avoid unused-but-set-variable warning */, \
(old_crtc_state) = (__state)->crtcs[__i].old_state, \
+ (void)(old_crtc_state) /* Only to avoid unused-but-set-variable warning */, \
(new_crtc_state) = (__state)->crtcs[__i].new_state, 1))
/**
@@ -762,7 +768,9 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->crtcs[__i].ptr && \
((crtc) = (__state)->crtcs[__i].ptr, \
- (new_crtc_state) = (__state)->crtcs[__i].new_state, 1))
+ (void)(crtc) /* Only to avoid unused-but-set-variable warning */, \
+ (new_crtc_state) = (__state)->crtcs[__i].new_state, \
+ (void)(new_crtc_state) /* Only to avoid unused-but-set-variable warning */, 1))
/**
* for_each_oldnew_plane_in_state - iterate over all planes in an atomic update
@@ -782,6 +790,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->planes[__i].ptr && \
((plane) = (__state)->planes[__i].ptr, \
+ (void)(plane) /* Only to avoid unused-but-set-variable warning */, \
(old_plane_state) = (__state)->planes[__i].old_state,\
(new_plane_state) = (__state)->planes[__i].new_state, 1))
@@ -842,7 +851,9 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->planes[__i].ptr && \
((plane) = (__state)->planes[__i].ptr, \
- (new_plane_state) = (__state)->planes[__i].new_state, 1))
+ (void)(plane) /* Only to avoid unused-but-set-variable warning */, \
+ (new_plane_state) = (__state)->planes[__i].new_state, \
+ (void)(new_plane_state) /* Only to avoid unused-but-set-variable warning */, 1))
/**
* for_each_oldnew_private_obj_in_state - iterate over all private objects in an atomic update
--
2.17.1
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5120): https://lists.cip-project.org/g/cip-dev/message/5120
Mute This Topic: https://lists.cip-project.org/mt/76165489/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings
2020-08-13 8:39 ` [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings Biju Das
@ 2020-08-13 20:49 ` Pavel Machek
2020-08-19 23:16 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2020-08-13 20:49 UTC (permalink / raw)
To: Biju Das
Cc: cip-dev, Nobuhiro Iwamatsu, Pavel Machek, Chris Paterson,
Prabhakar Mahadev Lad
[-- Attachment #1.1: Type: text/plain, Size: 833 bytes --]
Hi!
> From: Benjamin Gaignard <benjamin.gaignard@st.com>
>
> commit bf5d837a0a4ced7cc223befc9e76d4ad30697d27 upstream.
>
> Few for_each macro set variables that are never used later which led
> to generate unused-but-set-variable warnings.
> Add (void)(foo) inside the macros to remove these warnings
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Link: https://patchwork.freedesktop.org/patch/msgid/20191008124254.2144-1-benjamin.gaignard@st.com
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Thanks for the fixes. Applied and pushed out.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5122): https://lists.cip-project.org/g/cip-dev/message/5122
Mute This Topic: https://lists.cip-project.org/mt/76165489/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings
2020-08-13 20:49 ` Pavel Machek
@ 2020-08-19 23:16 ` Nobuhiro Iwamatsu
2020-08-20 9:41 ` Pavel Machek
0 siblings, 1 reply; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2020-08-19 23:16 UTC (permalink / raw)
To: pavel, biju.das.jz; +Cc: cip-dev, chris.paterson2, prabhakar.mahadev-lad.rj
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]
Hi Pavel,
> -----Original Message-----
> From: Pavel Machek [mailto:pavel@denx.de]
> Sent: Friday, August 14, 2020 5:49 AM
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>; Chris Paterson <chris.paterson2@renesas.com>;
> Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings
>
> Hi!
>
> > From: Benjamin Gaignard <benjamin.gaignard@st.com>
> >
> > commit bf5d837a0a4ced7cc223befc9e76d4ad30697d27 upstream.
> >
> > Few for_each macro set variables that are never used later which led
> > to generate unused-but-set-variable warnings.
> > Add (void)(foo) inside the macros to remove these warnings
> >
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Link: https://patchwork.freedesktop.org/patch/msgid/20191008124254.2144-1-benjamin.gaignard@st.com
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>
> Thanks for the fixes. Applied and pushed out.
This patch doesn't seem to have been pushed yet.
Could you push me?
>
> Best regards,
> Pavel
Best regards,
Nobuhiro
>
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5156): https://lists.cip-project.org/g/cip-dev/message/5156
Mute This Topic: https://lists.cip-project.org/mt/76165489/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings
2020-08-19 23:16 ` Nobuhiro Iwamatsu
@ 2020-08-20 9:41 ` Pavel Machek
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2020-08-20 9:41 UTC (permalink / raw)
To: nobuhiro1.iwamatsu
Cc: pavel, biju.das.jz, cip-dev, chris.paterson2,
prabhakar.mahadev-lad.rj
[-- Attachment #1.1: Type: text/plain, Size: 927 bytes --]
Hi!
> > > commit bf5d837a0a4ced7cc223befc9e76d4ad30697d27 upstream.
> > >
> > > Few for_each macro set variables that are never used later which led
> > > to generate unused-but-set-variable warnings.
> > > Add (void)(foo) inside the macros to remove these warnings
> > >
> > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Link: https://patchwork.freedesktop.org/patch/msgid/20191008124254.2144-1-benjamin.gaignard@st.com
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >
> > Thanks for the fixes. Applied and pushed out.
>
> This patch doesn't seem to have been pushed yet.
> Could you push me?
Sorry for that, should be fixed now.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5163): https://lists.cip-project.org/g/cip-dev/message/5163
Mute This Topic: https://lists.cip-project.org/mt/76165489/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-20 9:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-13 8:39 [cip-dev] [PATCH 4.19.y-cip 1/2] drm: Add drm_atomic_get_old/new_private_obj_state Biju Das
2020-08-13 8:39 ` [cip-dev] [PATCH 4.19.y-cip 2/2] drm: atomic helper: fix W=1 warnings Biju Das
2020-08-13 20:49 ` Pavel Machek
2020-08-19 23:16 ` Nobuhiro Iwamatsu
2020-08-20 9:41 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox