* [PATCH] drm/amd/display: Fix build warnings
@ 2021-04-21 16:18 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-04-21 16:18 UTC (permalink / raw)
To: Harry Wentland
Cc: David Airlie, Daniel Vetter, amd-gfx, dri-devel, linux-kernel,
Guenter Roeck
Fix the following build warnings.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘dm_update_mst_vcpi_slots_for_dsc’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
warning: variable ‘old_con_state’ set but not used
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘amdgpu_dm_commit_cursors’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
warning: variable ‘new_plane_state’ set but not used
The variables were introduced to be used in iterators, but not used.
Use other iterators which don't require the unused variables.
Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 573cf17262da..f9b87f1f424b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
{
struct dc_stream_state *stream = NULL;
struct drm_connector *connector;
- struct drm_connector_state *new_con_state, *old_con_state;
+ struct drm_connector_state *new_con_state;
struct amdgpu_dm_connector *aconnector;
struct dm_connector_state *dm_conn_state;
int i, j, clock, bpp;
int vcpi, pbn_div, pbn = 0;
- for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
+ for_each_new_connector_in_state(state, connector, new_con_state, i) {
aconnector = to_amdgpu_dm_connector(connector);
@@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
{
struct drm_plane *plane;
- struct drm_plane_state *old_plane_state, *new_plane_state;
+ struct drm_plane_state *old_plane_state;
int i;
/*
* TODO: Make this per-stream so we don't issue redundant updates for
* commits with multiple streams.
*/
- for_each_oldnew_plane_in_state(state, plane, old_plane_state,
- new_plane_state, i)
+ for_each_old_plane_in_state(state, plane, old_plane_state, i)
if (plane->type == DRM_PLANE_TYPE_CURSOR)
handle_cursor_update(plane, old_plane_state);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/amd/display: Fix build warnings
@ 2021-04-21 16:18 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-04-21 16:18 UTC (permalink / raw)
To: Harry Wentland
Cc: David Airlie, linux-kernel, dri-devel, amd-gfx, Guenter Roeck
Fix the following build warnings.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘dm_update_mst_vcpi_slots_for_dsc’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
warning: variable ‘old_con_state’ set but not used
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘amdgpu_dm_commit_cursors’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
warning: variable ‘new_plane_state’ set but not used
The variables were introduced to be used in iterators, but not used.
Use other iterators which don't require the unused variables.
Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 573cf17262da..f9b87f1f424b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
{
struct dc_stream_state *stream = NULL;
struct drm_connector *connector;
- struct drm_connector_state *new_con_state, *old_con_state;
+ struct drm_connector_state *new_con_state;
struct amdgpu_dm_connector *aconnector;
struct dm_connector_state *dm_conn_state;
int i, j, clock, bpp;
int vcpi, pbn_div, pbn = 0;
- for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
+ for_each_new_connector_in_state(state, connector, new_con_state, i) {
aconnector = to_amdgpu_dm_connector(connector);
@@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
{
struct drm_plane *plane;
- struct drm_plane_state *old_plane_state, *new_plane_state;
+ struct drm_plane_state *old_plane_state;
int i;
/*
* TODO: Make this per-stream so we don't issue redundant updates for
* commits with multiple streams.
*/
- for_each_oldnew_plane_in_state(state, plane, old_plane_state,
- new_plane_state, i)
+ for_each_old_plane_in_state(state, plane, old_plane_state, i)
if (plane->type == DRM_PLANE_TYPE_CURSOR)
handle_cursor_update(plane, old_plane_state);
}
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/amd/display: Fix build warnings
@ 2021-04-21 16:18 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-04-21 16:18 UTC (permalink / raw)
To: Harry Wentland
Cc: David Airlie, linux-kernel, dri-devel, amd-gfx, Daniel Vetter,
Guenter Roeck
Fix the following build warnings.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘dm_update_mst_vcpi_slots_for_dsc’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
warning: variable ‘old_con_state’ set but not used
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
In function ‘amdgpu_dm_commit_cursors’:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
warning: variable ‘new_plane_state’ set but not used
The variables were introduced to be used in iterators, but not used.
Use other iterators which don't require the unused variables.
Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 573cf17262da..f9b87f1f424b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
{
struct dc_stream_state *stream = NULL;
struct drm_connector *connector;
- struct drm_connector_state *new_con_state, *old_con_state;
+ struct drm_connector_state *new_con_state;
struct amdgpu_dm_connector *aconnector;
struct dm_connector_state *dm_conn_state;
int i, j, clock, bpp;
int vcpi, pbn_div, pbn = 0;
- for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
+ for_each_new_connector_in_state(state, connector, new_con_state, i) {
aconnector = to_amdgpu_dm_connector(connector);
@@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
{
struct drm_plane *plane;
- struct drm_plane_state *old_plane_state, *new_plane_state;
+ struct drm_plane_state *old_plane_state;
int i;
/*
* TODO: Make this per-stream so we don't issue redundant updates for
* commits with multiple streams.
*/
- for_each_oldnew_plane_in_state(state, plane, old_plane_state,
- new_plane_state, i)
+ for_each_old_plane_in_state(state, plane, old_plane_state, i)
if (plane->type == DRM_PLANE_TYPE_CURSOR)
handle_cursor_update(plane, old_plane_state);
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Fix build warnings
2021-04-21 16:18 ` Guenter Roeck
(?)
@ 2021-04-28 21:12 ` Alex Deucher
-1 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2021-04-28 21:12 UTC (permalink / raw)
To: Guenter Roeck
Cc: Harry Wentland, David Airlie, LKML, Maling list - DRI developers,
amd-gfx list
On Wed, Apr 21, 2021 at 12:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Fix the following build warnings.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘dm_update_mst_vcpi_slots_for_dsc’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
> warning: variable ‘old_con_state’ set but not used
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘amdgpu_dm_commit_cursors’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
> warning: variable ‘new_plane_state’ set but not used
>
> The variables were introduced to be used in iterators, but not used.
> Use other iterators which don't require the unused variables.
>
> Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
> Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 573cf17262da..f9b87f1f424b 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
> {
> struct dc_stream_state *stream = NULL;
> struct drm_connector *connector;
> - struct drm_connector_state *new_con_state, *old_con_state;
> + struct drm_connector_state *new_con_state;
> struct amdgpu_dm_connector *aconnector;
> struct dm_connector_state *dm_conn_state;
> int i, j, clock, bpp;
> int vcpi, pbn_div, pbn = 0;
>
> - for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
> + for_each_new_connector_in_state(state, connector, new_con_state, i) {
>
> aconnector = to_amdgpu_dm_connector(connector);
>
> @@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
> static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
> {
> struct drm_plane *plane;
> - struct drm_plane_state *old_plane_state, *new_plane_state;
> + struct drm_plane_state *old_plane_state;
> int i;
>
> /*
> * TODO: Make this per-stream so we don't issue redundant updates for
> * commits with multiple streams.
> */
> - for_each_oldnew_plane_in_state(state, plane, old_plane_state,
> - new_plane_state, i)
> + for_each_old_plane_in_state(state, plane, old_plane_state, i)
> if (plane->type == DRM_PLANE_TYPE_CURSOR)
> handle_cursor_update(plane, old_plane_state);
> }
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Fix build warnings
@ 2021-04-28 21:12 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2021-04-28 21:12 UTC (permalink / raw)
To: Guenter Roeck
Cc: David Airlie, amd-gfx list, LKML, Maling list - DRI developers
On Wed, Apr 21, 2021 at 12:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Fix the following build warnings.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘dm_update_mst_vcpi_slots_for_dsc’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
> warning: variable ‘old_con_state’ set but not used
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘amdgpu_dm_commit_cursors’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
> warning: variable ‘new_plane_state’ set but not used
>
> The variables were introduced to be used in iterators, but not used.
> Use other iterators which don't require the unused variables.
>
> Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
> Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 573cf17262da..f9b87f1f424b 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
> {
> struct dc_stream_state *stream = NULL;
> struct drm_connector *connector;
> - struct drm_connector_state *new_con_state, *old_con_state;
> + struct drm_connector_state *new_con_state;
> struct amdgpu_dm_connector *aconnector;
> struct dm_connector_state *dm_conn_state;
> int i, j, clock, bpp;
> int vcpi, pbn_div, pbn = 0;
>
> - for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
> + for_each_new_connector_in_state(state, connector, new_con_state, i) {
>
> aconnector = to_amdgpu_dm_connector(connector);
>
> @@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
> static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
> {
> struct drm_plane *plane;
> - struct drm_plane_state *old_plane_state, *new_plane_state;
> + struct drm_plane_state *old_plane_state;
> int i;
>
> /*
> * TODO: Make this per-stream so we don't issue redundant updates for
> * commits with multiple streams.
> */
> - for_each_oldnew_plane_in_state(state, plane, old_plane_state,
> - new_plane_state, i)
> + for_each_old_plane_in_state(state, plane, old_plane_state, i)
> if (plane->type == DRM_PLANE_TYPE_CURSOR)
> handle_cursor_update(plane, old_plane_state);
> }
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Fix build warnings
@ 2021-04-28 21:12 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2021-04-28 21:12 UTC (permalink / raw)
To: Guenter Roeck
Cc: David Airlie, amd-gfx list, Harry Wentland, LKML,
Maling list - DRI developers
On Wed, Apr 21, 2021 at 12:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Fix the following build warnings.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘dm_update_mst_vcpi_slots_for_dsc’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46:
> warning: variable ‘old_con_state’ set but not used
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:
> In function ‘amdgpu_dm_commit_cursors’:
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44:
> warning: variable ‘new_plane_state’ set but not used
>
> The variables were introduced to be used in iterators, but not used.
> Use other iterators which don't require the unused variables.
>
> Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes")
> Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 573cf17262da..f9b87f1f424b 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6239,13 +6239,13 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
> {
> struct dc_stream_state *stream = NULL;
> struct drm_connector *connector;
> - struct drm_connector_state *new_con_state, *old_con_state;
> + struct drm_connector_state *new_con_state;
> struct amdgpu_dm_connector *aconnector;
> struct dm_connector_state *dm_conn_state;
> int i, j, clock, bpp;
> int vcpi, pbn_div, pbn = 0;
>
> - for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
> + for_each_new_connector_in_state(state, connector, new_con_state, i) {
>
> aconnector = to_amdgpu_dm_connector(connector);
>
> @@ -7706,15 +7706,14 @@ static void amdgpu_dm_handle_vrr_transition(struct dm_crtc_state *old_state,
> static void amdgpu_dm_commit_cursors(struct drm_atomic_state *state)
> {
> struct drm_plane *plane;
> - struct drm_plane_state *old_plane_state, *new_plane_state;
> + struct drm_plane_state *old_plane_state;
> int i;
>
> /*
> * TODO: Make this per-stream so we don't issue redundant updates for
> * commits with multiple streams.
> */
> - for_each_oldnew_plane_in_state(state, plane, old_plane_state,
> - new_plane_state, i)
> + for_each_old_plane_in_state(state, plane, old_plane_state, i)
> if (plane->type == DRM_PLANE_TYPE_CURSOR)
> handle_cursor_update(plane, old_plane_state);
> }
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-28 21:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 16:18 [PATCH] drm/amd/display: Fix build warnings Guenter Roeck
2021-04-21 16:18 ` Guenter Roeck
2021-04-21 16:18 ` Guenter Roeck
2021-04-28 21:12 ` Alex Deucher
2021-04-28 21:12 ` Alex Deucher
2021-04-28 21:12 ` Alex Deucher
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.