Skip to contentSkip to conversation

drm/amdgpu: Fix connector atomic_check compilation fail

PATCH Applied Sean Paul 3 participants 3 messages Jun 14, 2019

Subsystems (3)
lore
Share & tools
lore

Sean Paul

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix connector atomic_check compilation fail

From: Sean Paul <[email protected]>

I missed amdgpu in my connnector_helper_funcs->atomic_check conversion, which is understandably causing compilation failures.

Fixes 6f3b62781bbd ("drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state")
Cc Daniel Vetter <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Ben Skeggs <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Kieran Bingham <[email protected]>
Cc Eric Anholt <[email protected]>
Cc Laurent Pinchart <[email protected]> [for rcar lvds]
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Lyude Paul <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Ilia Mirkin <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -2
index 3a723e553a193..3d5e828c3d284 100644
@@ -3953,9 +3953,10 @@ is_hdr_metadata_different(const struct drm_connector_state *old_state,
 
 static int
 amdgpu_dm_connector_atomic_check(struct drm_connector *conn,
-				 struct drm_connector_state *new_con_state)
+				 struct drm_atomic_state *state)
 {
-	struct drm_atomic_state *state = new_con_state->state;
+	struct drm_connector_state *new_con_state =
+		drm_atomic_get_new_connector_state(state, conn);
 	struct drm_connector_state *old_con_state =
 		drm_atomic_get_old_connector_state(state, conn);
 	struct drm_crtc *crtc = new_con_state->crtc;
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/amdgpu: Fix connector atomic_check compilation fail

== Series Details ==

== Series Details ==

Series: drm/amdgpu: Fix connector atomic_check compilation fail
URL : https://patchwork.freedesktop.org/series/62074/
State : failure

== Summary ==

CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.o
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4024:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.atomic_check = amdgpu_dm_connector_atomic_check,

                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4024:18: note: (near initialization for ‘amdgpu_dm_connector_helper_funcs.atomic_check’)
cc1: some warnings being treated as errors
scripts/Makefile.build:278: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.o' failed
make[4]: *** [drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.o] Error 1
scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm/amd/amdgpu' failed
make[3]: *** [drivers/gpu/drm/amd/amdgpu] Error 2
scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:489: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1071: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Sean Paul

Op 14-06-2019 om 02:27 schreef Sean Paul:

Quoted 40 lines

From: Sean Paul <[email protected]>

I missed amdgpu in my connnector_helper_funcs->atomic_check conversion, which is understandably causing compilation failures.

Fixes 6f3b62781bbd ("drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state")
Cc Daniel Vetter <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Ben Skeggs <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Kieran Bingham <[email protected]>
Cc Eric Anholt <[email protected]>
Cc Laurent Pinchart <[email protected]> [for rcar lvds]
Cc Sean Paul <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Lyude Paul <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Ilia Mirkin <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3a723e553a193..3d5e828c3d284 100644
@@ -3953,9 +3953,10 @@ is_hdr_metadata_different(const struct drm_connector_state *old_state,
 
 static int

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c is_hdr_metadata_different(const struct drm_connector_state *old_state, · line 3962

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -2
 amdgpu_dm_connector_atomic_check(struct drm_connector *conn,
-				 struct drm_connector_state *new_con_state)
+				 struct drm_atomic_state *state)
 {
-	struct drm_atomic_state *state = new_con_state->state;
+	struct drm_connector_state *new_con_state =
+		drm_atomic_get_new_connector_state(state, conn);
 	struct drm_connector_state *old_con_state =
 		drm_atomic_get_old_connector_state(state, conn);
 	struct drm_crtc *crtc = new_con_state->crtc;

Thanks, applied. :)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx