drm/sun4i: mark PM functions as __maybe_unused
Subsystems (12)
PATCH 1/8 drm/sun4i: mark PM functions as __maybe_unused
Disabling CONFIG_PM produces a compile time warning when these functions are not referenced:
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1072:12: error: 'sun6i_dsi_runtime_suspend' defined but not used [-Werror=unused-function]
static int sun6i_dsi_runtime_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1043:12: error: 'sun6i_dsi_runtime_resume' defined but not used [-Werror=unused-function]
static int sun6i_dsi_runtime_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~--- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +2 -2
@@ -1040,7 +1040,7 @@ static int sun6i_dsi_remove(struct platform_device *pdev)return 0 ; } -static int sun6i_dsi_runtime_resume (struct device *dev) +static int __maybe_unused sun6i_dsi_runtime_resume (struct device *dev) {struct sun6i_dsi *dsi =dev_get_drvdata (dev);
@@ -1069,7 +1069,7 @@ static int sun6i_dsi_runtime_resume(struct device *dev)return 0 ; } -static int sun6i_dsi_runtime_suspend (struct device *dev) +static int __maybe_unused sun6i_dsi_runtime_suspend (struct device *dev) {struct sun6i_dsi *dsi =dev_get_drvdata (dev);
Signature · 1 line
2.9.0
PATCH 2/8 drm/amdgpu: fix 32-bit build warning
Casting a pointer to a 64-bit type causes a warning on 32-bit targets:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:473:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
lower_32_bits((uint64_t)wptr));
^
drivers/gpu/drm/amd/amdgpu/amdgpu.h:1701:53: note: in definition of macro 'WREG32'
#define WREG32(reg, v) amdgpu_mm_wreg(adev, (reg), (v), 0)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:473:10: note: in expansion of macro 'lower_32_bits'
lower_32_bits((uint64_t)wptr));
^~~~~~~~~~~~~The correct method is to cast to 'uintptr_t'.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +2 -2
@@ -470,9 +470,9 @@ static int kgd_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id,WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_HI),upper_32_bits (guessed_wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_POLL_ADDR), -lower_32_bits ((uint64_t )wptr)); +lower_32_bits ((uintptr_t )wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_POLL_ADDR_HI), -upper_32_bits ((uint64_t )wptr)); +upper_32_bits ((uintptr_t )wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_PQ_WPTR_POLL_CNTL1),get_queue_mask (adev, pipe_id, queue_id)); }
Signature · 1 line
2.9.0
Re: [PATCH 2/8] drm/amdgpu: fix 32-bit build warning
Quoted 37 lines · Arnd Bergmann
Casting a pointer to a 64-bit type causes a warning on 32-bit targets:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:473:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]lower_32_bits((uint64_t)wptr)); ^ drivers/gpu/drm/amd/amdgpu/amdgpu.h:1701:53: note: in definition of macro 'WREG32' #define WREG32(reg, v) amdgpu_mm_wreg(adev, (reg), (v), 0) ^ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:473:10: note: in expansion of macro 'lower_32_bits' lower_32_bits((uint64_t)wptr)); ^~~~~~~~~~~~~The correct method is to cast to '
uintptr_t'.Fixes d5a114a6c5f7 ("drm/amdgpu: Add GFXv9 kfd2kgd interface functions")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +2
-3@@ -470,9 +470,9 @@ static int kgd_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id,WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_HI),upper_32_bits (guessed_wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_POLL_ADDR), -lower_32_bits ((uint64_t )wptr)); +lower_32_bits ((uintptr_t )wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_HQD_PQ_WPTR_POLL_ADDR_HI), -upper_32_bits ((uint64_t )wptr)); +upper_32_bits ((uintptr_t )wptr));WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_PQ_WPTR_POLL_CNTL1),get_queue_mask (adev, pipe_id, queue_id)); } --
Quoted 2 lines
2.9.0
There is a change scheduled for the next merge window that will cause this file to not build anymore on 32-bit targets (because the amdkfd driver is not supported on 32 bit targets).
Never the less I'm taking the patch for good measure.
This patch is:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/8 drm/xen-front: fix 32-bit build warning
In reply to Arnd BergmannIn 32-bit kernel builds, we cannot cast between a pointer and a 64-bit type:
In file included from drivers/gpu/drm/xen/xen_drm_front_cfg.c:18:drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_fb_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:129:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)fb;
drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_dbuf_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:134:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)gem_obj;
drivers/gpu/drm/xen/xen_drm_front_shbuf.c: In function 'backend_unmap':drivers/gpu/drm/xen/xen_drm_front_shbuf.c:125:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
Using uintptr_t instead probably does what we want here, although it's not clear to me why we assign a virtual address pointer to a phys_addr_t in backend_unmap().
--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/xen/xen_drm_front.h +2 -2
@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (uintptr_t )fb; }static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1 -1
@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {
Signature · 1 line
2.9.0
Re: [PATCH 3/8] drm/xen-front: fix 32-bit build warning
Hi,
Quoted 51 lines · Arnd Bergmann
In 32-bit kernel builds, we cannot cast between a pointer and a 64-bit type:
In file included from
drivers/gpu/drm/xen/xen_drm_front_cfg.c:18:drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_fb_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:129:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)fb;
drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_dbuf_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:134:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)gem_obj;
drivers/gpu/drm/xen/xen_drm_front_shbuf.c: In function 'backend_unmap':drivers/gpu/drm/xen/xen_drm_front_shbuf.c:125:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page)))Using
uintptr_tinstead probably does what we want here, although it's not clear to me why we assign a virtual address pointer to aphys_addr_tinbackend_unmap().Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +2
-2@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (uintptr_t )fb; }static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 128
Quoted 8 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {
Thank you for your patch: this issue was already discussed [1] and applied [2] to drm-misc-next.
Thank you,
Oleksandr
[1] https://patchwork.freedesktop.org/patch/224359/
[2] https://patchwork.freedesktop.org/patch/224920/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 3/8] drm/xen-front: fix 32-bit build warning
In reply to Arnd BergmannHi,
Quoted 51 lines · Arnd Bergmann
In 32-bit kernel builds, we cannot cast between a pointer and a 64-bit type:
In file included from
drivers/gpu/drm/xen/xen_drm_front_cfg.c:18:drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_fb_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:129:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)fb;
drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_dbuf_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:134:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)gem_obj;
drivers/gpu/drm/xen/xen_drm_front_shbuf.c: In function 'backend_unmap':drivers/gpu/drm/xen/xen_drm_front_shbuf.c:125:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page)))Using
uintptr_tinstead probably does what we want here, although it's not clear to me why we assign a virtual address pointer to aphys_addr_tinbackend_unmap().Fixes c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/xen/xen_drm_front.h +2
-2@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (uintptr_t )fb; }static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,drivers/gpu/drm/xen/xen_drm_front_shbuf.c +0
-0
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) · line 128
Quoted 8 lines
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {
Thank you for your patch: this issue was already discussed [1] and applied [2] to drm-misc-next.
Thank you,
Oleksandr
[1] https://patchwork.freedesktop.org/patch/224359/
[2] https://patchwork.freedesktop.org/patch/224920/
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/8] drm/xen-front: fix 32-bit build warning
Quoted 18 lines · Oleksandr Andrushchenko
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 127
Quoted 12 lines · Arnd Bergmann
b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
index8099cb343ae3..d333b67cc1a0100644drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {Thank you for your patch: this issue was already discussed [1] and applied
[2] to
drm-misc-next.
Ok, thanks, and sorry for the duplicate. Linux-next releases have been a bit sporadic recently so I didn't run the latest tree for all cases.
Arnd
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 3/8] drm/xen-front: fix 32-bit build warning
In reply to Oleksandr AndrushchenkoQuoted 18 lines · Oleksandr Andrushchenko
drivers/gpu/drm/xen/xen_drm_front_shbuf.c static void guest_calc_num_grefs(struct · line 127
Quoted 12 lines · Arnd Bergmann
b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
index8099cb343ae3..d333b67cc1a0100644drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1
-1@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {Thank you for your patch: this issue was already discussed [1] and applied
[2] to
drm-misc-next.
Ok, thanks, and sorry for the duplicate. Linux-next releases have been a bit sporadic recently so I didn't run the latest tree for all cases.
Arnd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/8 drm/xen-front: fix 32-bit build warning
In reply to Arnd BergmannIn 32-bit kernel builds, we cannot cast between a pointer and a 64-bit type:
In file included from drivers/gpu/drm/xen/xen_drm_front_cfg.c:18:drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_fb_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:129:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)fb;
drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_dbuf_to_cookie':drivers/gpu/drm/xen/xen_drm_front.h:134:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
return (u64)gem_obj;
drivers/gpu/drm/xen/xen_drm_front_shbuf.c: In function 'backend_unmap':drivers/gpu/drm/xen/xen_drm_front_shbuf.c:125:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
Using uintptr_t instead probably does what we want here, although it's not clear to me why we assign a virtual address pointer to a phys_addr_t in backend_unmap().
--- drivers/gpu/drm/xen/xen_drm_front.h | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/xen/xen_drm_front.h +2 -2
@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {static inline u64 xen_drm_front_fb_to_cookie (struct drm_framebuffer *fb) { -return (u64 )fb; +return (uintptr_t )fb; }static inline u64 xen_drm_front_dbuf_to_cookie (struct drm_gem_object *gem_obj) { -return (u64 )gem_obj; +return (uintptr_t )gem_obj; } int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
drivers/gpu/drm/xen/xen_drm_front_shbuf.c +1 -1
@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf) }#define xen_page_to_vaddr (page) \ - ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page))) + ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))static int backend_unmap (struct xen_drm_front_shbuf *buf) {
Signature · 7 lines
2.9.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 4/8 drm/rcar-du: fix merge conflict for state->alpha
In reply to Arnd BergmannThe "alpha" struct member was removed in one commit but another user added in another, leading to a build failure:
drivers/gpu/drm/rcar-du/rcar_du_vsp.c: In function 'rcar_du_vsp_plane_atomic_duplicate_state':drivers/gpu/drm/rcar-du/rcar_du_vsp.c:325:6: error: 'struct rcar_du_vsp_plane_state' has no member named 'alpha'
copy->alpha = to_rcar_vsp_plane_state(plane->state)->alpha;
This fixes up the merge by using the correct member.
--- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +1 -1
@@ -322,7 +322,7 @@ rcar_du_vsp_plane_atomic_duplicate_state(struct drm_plane *plane)return NULL ;__drm_atomic_helper_plane_duplicate_state (plane, ©->state); - copy->alpha =to_rcar_vsp_plane_state (plane->state)->alpha; + copy->state.alpha = plane->state->alpha;return ©->state; }
Signature · 1 line
2.9.0
Laurent Pinchart
reviewerRe: [PATCH 4/8] drm/rcar-du: fix merge conflict for state->alpha
Hi Arnd,
Thank you for the patch.
Quoted 9 lines · On Friday, 25 May 2018 18:50:11 EEST Arnd Bergmann wrote:
The "alpha" struct member was removed in one commit but another user added in another, leading to a build failure:
drivers/gpu/drm/rcar-du/rcar_du_vsp.c: In function 'rcar_du_vsp_plane_atomic_duplicate_state':drivers/gpu/drm/rcar-du/rcar_du_vsp.c:325:6: error: 'structrcar_du_vsp_plane_state' has no member named 'alpha'copy->alpha= to_rcar_vsp_plane_state(plane->state)->alpha;
Quoted 5 lines
This fixes up the merge by using the correct member.
Fixes 75a07f399cd4 ("drm: rcar-du: Zero-out sg_tables when duplicatingplane state") Fixes:
301a9b8d5456("drm/rcar-du: Convert to the new generic alpha property") Signed-off-by: Arnd Bergmann <[email protected]>
I have posted the same fix a week ago, see https://patchwork.freedesktop.org/
patch/msgid/[email protected]. The patch is in Dave's master branch in commit 315852b422972e6ebb1dfddaadada09e46a2681a.
Quoted 18 lines
--- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/rcar-du/rcar_du_vsp.cindex4a98470626d5..d9232e749b6d100644drivers/gpu/drm/rcar-du/rcar_du_vsp.c +1
-1@@ -322,7 +322,7 @@ rcar_du_vsp_plane_atomic_duplicate_state(struct drm_plane *plane) return NULL;__drm_atomic_helper_plane_duplicate_state (plane, ©->state); - copy->alpha =to_rcar_vsp_plane_state (plane->state)->alpha; + copy->state.alpha = plane->state->alpha;return ©->state; }
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 5/8 drm/v3d: add CONFIG_MMU dependency
In reply to Arnd BergmannWithout CONFIG_MMU, we get a link error:
drivers/gpu/drm/v3d/v3d_bo.o: In function `v3d_gem_fault':
v3d_bo.c:(.text+0x3ca): undefined reference to `vm_insert_mixed'
The other drivers with this problem already depend on CONFIG_MMU, so let's do the same thing here.
--- drivers/gpu/drm/v3d/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/v3d/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_V3D depends on ARCH_BCM || ARCH_BCMSTB || COMPILE_TEST depends on DRM depends on COMMON_CLK + depends on MMU select DRM_SCHED help Choose this option if you have a system that has a Broadcom
Signature · 1 line
2.9.0
Eric Anholt
AppliedRe: [PATCH 5/8] drm/v3d: add CONFIG_MMU dependency
Quoted 10 lines · Arnd Bergmann
Without
CONFIG_MMU, we get a link error:
drivers/gpu/drm/v3d/v3d_bo.o: In function `v3d_gem_fault':
v3d_bo.c:(.text+0x3ca): undefined reference to `vm_insert_mixed'The other drivers with this problem already depend on
CONFIG_MMU, so let's do the same thing here.Fixes 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")Signed-off-by Arnd Bergmann <[email protected]>
Applied to drm-misc-next-fixes. Thanks!
PATCH 6/8 drm/exynos: fix scaler_task_done return type
In reply to Arnd BergmannModern gcc versions warn about returning a ternary operator with an 'int' type in a function returning type 'bool':
drivers/gpu/drm/exynos/exynos_drm_scaler.c: In function 'scaler_task_done':drivers/gpu/drm/exynos/exynos_drm_scaler.c:402:47: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
return val & SCALER_INT_STATUS_FRAME_END ? 0 : -EINVAL;
Quoted 1 line
From context, it becomes clear that this should have been 'int',
so I'm fixing it, along with parenthesizing the expression to make it clearer what is meant here (I got confused at first, after seeing the warning).
--- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_scaler.c +2 -2
@@ -397,9 +397,9 @@ static inline u32 scaler_get_int_status(struct scaler_context *scaler)return scaler_read (SCALER_INT_STATUS ); } -static inline bool scaler_task_done (u32 val) +static inline int scaler_task_done (u32 val) { -return val &SCALER_INT_STATUS_FRAME_END ?0 : -EINVAL ; +return (val &SCALER_INT_STATUS_FRAME_END ) ?0 : -EINVAL ; }static irqreturn_t scaler_irq_handler (int irq,void *arg)
Signature · 1 line
2.9.0
PATCH 7/8 drm/bridge: fix dependency for lvds-encoder
In reply to Arnd BergmannThe DRM panel bridge code is built into the kms helpers module, so we get a link error when trying to use it from a built-in driver while the kms helper is a loadable module:
drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe':
lvds-encoder.c:(.text+0x124): undefined reference to `devm_drm_panel_bridge_add'
This adds a the same dependency in the lvds-encoder that we use for all the other users of the panel bridge. I did not bisect the problem, but from inspection it seems to date back to the patch that separated out the panel bridge from lvds encoder.
--- drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -46,6 +46,7 @@ config DRM_DUMB_VGA_DAC config DRM_LVDS_ENCODER tristate "Transparent parallel to LVDS encoder support" depends on OF + select DRM_KMS_HELPER select DRM_PANEL_BRIDGE help Support for transparent parallel to LVDS encoders that don't require
Signature · 1 line
2.9.0
Re: [PATCH 7/8] drm/bridge: fix dependency for lvds-encoder
Quoted 7 lines · Arnd Bergmann
The DRM panel bridge code is built into the kms helpers module, so we get a link error when trying to use it from a built-in driver while the kms helper is a loadable module:
drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe':
lvds-encoder.c:(.text+0x124): undefined reference to `devm_drm_panel_bridge_add'
Quoted 7 lines
This adds a the same dependency in the lvds-encoder that we use for all the other users of the panel bridge. I did not bisect the problem, but from inspection it seems to date back to the patch that separated out the panel bridge from lvds encoder.
Fixes 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge.")Signed-off-by Arnd Bergmann <[email protected]>
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Laurent Pinchart
reviewerRe: [PATCH 7/8] drm/bridge: fix dependency for lvds-encoder
In reply to Arnd BergmannHi Arnd,
Thank you for the patch.
Quoted 24 lines · On Friday, 25 May 2018 18:50:14 EEST Arnd Bergmann wrote:
The DRM panel bridge code is built into the kms helpers module, so we get a link error when trying to use it from a built-in driver while the kms helper is a loadable module:
drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe':
lvds-encoder.c:(.text+0x124): undefined reference to `devm_drm_panel_bridge_add'This adds a the same dependency in the lvds-encoder that we use for all the other users of the panel bridge. I did not bisect the problem, but from inspection it seems to date back to the patch that separated out the panel bridge from lvds encoder.
Fixes 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from thelvds-encoder bridge.") Signed-off-by: Arnd Bergmann <[email protected]>
--- drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/bridge/Kconfig +0
-0
drivers/gpu/drm/bridge/Kconfig config DRM_DUMB_VGA_DAC · line 52
Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1
-0@@ -46,6 +46,7 @@ config DRM_DUMB_VGA_DAC config DRM_LVDS_ENCODER tristate "Transparent parallel to LVDS encoder support" depends on OF + select DRM_KMS_HELPER select DRM_PANEL_BRIDGE help Support for transparent parallel to LVDS encoders that don't require
Wouldn't it be better to apply the following ?
config DRM_PANEL_BRIDGE
def_bool y
depends on DRM_BRIDGE
- depends on DRM_KMS_HELPER
+ select DRM_KMS_HELPER
select DRM_PANEL
help
DRM bridge wrapper of DRM panels
Otherwise you'll potentially have to patch every user of DRM_PANEL_BRIDGE as done in this patch.
Signature · 10 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm/bridge: fix dependency for lvds-encoder
Quoted 48 lines · Laurent Pinchart
Hi Arnd,
Thank you for the patch.
Quoted 24 lines · On Friday, 25 May 2018 18:50:14 EEST Arnd Bergmann wrote:
The DRM panel bridge code is built into the kms helpers module, so we get a link error when trying to use it from a built-in driver while the kms helper is a loadable module:
drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe':
lvds-encoder.c:(.text+0x124): undefined reference to `devm_drm_panel_bridge_add'This adds a the same dependency in the lvds-encoder that we use for all the other users of the panel bridge. I did not bisect the problem, but from inspection it seems to date back to the patch that separated out the panel bridge from lvds encoder.
Fixes 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from thelvds-encoder bridge.") Signed-off-by: Arnd Bergmann <[email protected]>
--- drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/bridge/Kconfig +0
-0drivers/gpu/drm/bridge/Kconfig config DRM_DUMB_VGA_DAC · line 52
Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1
-0@@ -46,6 +46,7 @@ config DRM_DUMB_VGA_DAC config DRM_LVDS_ENCODER tristate "Transparent parallel to LVDS encoder support" depends on OF + select DRM_KMS_HELPER select DRM_PANEL_BRIDGE help Support for transparent parallel to LVDS encoders that don't requireWouldn't it be better to apply the following ?
config
DRM_PANEL_BRIDGE
def_booly
depends onDRM_BRIDGE(quoted diff) +1
-1- depends on DRM_KMS_HELPER + select DRM_KMS_HELPER select DRM_PANEL help DRM bridge wrapper of DRM panels
Quoted 2 lines
Otherwise you'll potentially have to patch every user of
DRM_PANEL_BRIDGEas done in this patch.
Select isn't recursive, so this won't work unfortunately :-/ -Daniel
Quoted 11 lines
--
Regards,Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm/bridge: fix dependency for lvds-encoder
Quoted 50 lines · Daniel Vetter
Quoted 48 lines · Laurent Pinchart
Hi Arnd,
Thank you for the patch.
Quoted 24 lines · On Friday, 25 May 2018 18:50:14 EEST Arnd Bergmann wrote:
The DRM panel bridge code is built into the kms helpers module, so we get a link error when trying to use it from a built-in driver while the kms helper is a loadable module:
drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe':
lvds-encoder.c:(.text+0x124): undefined reference to `devm_drm_panel_bridge_add'This adds a the same dependency in the lvds-encoder that we use for all the other users of the panel bridge. I did not bisect the problem, but from inspection it seems to date back to the patch that separated out the panel bridge from lvds encoder.
Fixes 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from thelvds-encoder bridge.") Signed-off-by: Arnd Bergmann <[email protected]>
--- drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/bridge/Kconfig +0
-0drivers/gpu/drm/bridge/Kconfig config DRM_DUMB_VGA_DAC · line 52
Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1
-0@@ -46,6 +46,7 @@ config DRM_DUMB_VGA_DAC config DRM_LVDS_ENCODER tristate "Transparent parallel to LVDS encoder support" depends on OF + select DRM_KMS_HELPER select DRM_PANEL_BRIDGE help Support for transparent parallel to LVDS encoders that don't requireWouldn't it be better to apply the following ?
config
DRM_PANEL_BRIDGE
def_booly
depends onDRM_BRIDGE(quoted diff) +1
-1- depends on DRM_KMS_HELPER + select DRM_KMS_HELPER select DRM_PANEL help DRM bridge wrapper of DRM panels
Quoted 4 lines
Quoted 2 lines
Otherwise you'll potentially have to patch every user of
DRM_PANEL_BRIDGEas done in this patch.Select isn't recursive, so this won't work unfortunately :-/
The problem is a bit different: select *is* recursive, which is part of the reason we normally try to avoid it (it gets hard to disable certain symbols or turn them into modules when there are lots of things selecting them).
However, DRM_PANEL_BRIDGE is a silent 'bool' symbol that is always enabled when DRM_BRIDGE is enabled. Making it 'select DRM_KMS_HELPER' would lead to DRM_KMS_HELPER always being built-in even if all other DRM drivers are configured as loadable modules! Note these Makefile line in drivers/gpu/drm:
drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
The intention is definitely that drm_kms_helper can be a loadable module, (it cannot be built-in when CONFIG_DRM=m) and the panel bridge is simply a component that gets linked into it, as of commit 123387d5efa6 ("drm/bridge: Build the panel wrapper in drm_kms_helper").
Arnd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 8/8 drm/bridge: cdns: mark PM functions as __maybe_unused
In reply to Arnd BergmannThese two functions are unused in some configurations, and using __maybe_unused is the easiest way to shut up the harmless warnings:
drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: error: 'cdns_dsi_suspend' defined but not used [-Werror=unused-function]
static int cdns_dsi_suspend(struct device *dev)
^~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/cdns-dsi.c:1340:12: error: 'cdns_dsi_resume' defined but not used [-Werror=unused-function]
static int cdns_dsi_resume(struct device *dev)
--- drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/cdns-dsi.c +2 -2
@@ -1337,7 +1337,7 @@ static const struct mipi_dsi_host_ops cdns_dsi_ops = { .transfer = cdns_dsi_transfer, }; -static int cdns_dsi_resume (struct device *dev) +static int __maybe_unused cdns_dsi_resume (struct device *dev) {struct cdns_dsi *dsi =dev_get_drvdata (dev);
@@ -1350,7 +1350,7 @@ static int cdns_dsi_resume(struct device *dev)return 0 ; } -static int cdns_dsi_suspend (struct device *dev) +static int __maybe_unused cdns_dsi_suspend (struct device *dev) {struct cdns_dsi *dsi =dev_get_drvdata (dev);
Signature · 1 line
2.9.0
Re: [PATCH 8/8] drm/bridge: cdns: mark PM functions as __maybe_unused
+Thierry
Hi Arnd,
Quoted 11 lines · On Fri, 25 May 2018 17:50:15 +0200 Arnd Bergmann <[email protected]> wrote:
These two functions are unused in some configurations, and using
__maybe_unusedis the easiest way to shut up the harmless warnings:
drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: error: 'cdns_dsi_suspend' defined but not used [-Werror=unused-function]
static intcdns_dsi_suspend(struct device *dev)^~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/cdns-dsi.c:1340:12: error: 'cdns_dsi_resume' defined but not used [-Werror=unused-function]
static intcdns_dsi_resume(struct device *dev)Fixes e19233955d9e ("drm/bridge: Add Cadence DSI driver")Signed-off-by Arnd Bergmann <[email protected]>
Hm, I thought such a patch had already been applied by Thierry [1].
[1]https://www.spinics.net/lists/dri-devel/msg174363.html
Quoted 18 lines
--- drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/bridge/cdns-dsi.c +1
-1@@ -1337,7 +1337,7 @@ static const struct mipi_dsi_host_ops cdns_dsi_ops = { .transfer = cdns_dsi_transfer, }; -static int cdns_dsi_resume (struct device *dev) +static int __maybe_unused cdns_dsi_resume (struct device *dev) {struct cdns_dsi *dsi =dev_get_drvdata (dev);
drivers/gpu/drm/bridge/cdns-dsi.c static int cdns_dsi_resume(struct device *dev) · line 1356
Quoted 8 lines
drivers/gpu/drm/bridge/cdns-dsi.c +1
-1@@ -1350,7 +1350,7 @@ static int cdns_dsi_resume(struct device *dev)return 0 ; } -static int cdns_dsi_suspend (struct device *dev) +static int __maybe_unused cdns_dsi_suspend (struct device *dev) {struct cdns_dsi *dsi =dev_get_drvdata (dev);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 8/8] drm/bridge: cdns: mark PM functions as __maybe_unused
Quoted 16 lines · Boris Brezillon
+Thierry
Hi Arnd,
Quoted 9 lines · On Fri, 25 May 2018 17:50:15 +0200 Arnd Bergmann <[email protected]> wrote:
These two functions are unused in some configurations, and using
__maybe_unusedis the easiest way to shut up the harmless warnings:
drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: error: 'cdns_dsi_suspend' defined but not used [-Werror=unused-function]
static intcdns_dsi_suspend(struct device *dev)^~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/cdns-dsi.c:1340:12: error: 'cdns_dsi_resume' defined but not used [-Werror=unused-function]
static intcdns_dsi_resume(struct device *dev)
Quoted 6 lines
Quoted 2 lines
Fixes e19233955d9e ("drm/bridge: Add Cadence DSI driver")Signed-off-by Arnd Bergmann <[email protected]>Hm, I thought such a patch had already been applied by Thierry [1].
Yeah, that's in drm-misc-next, but didn't seem to have made it into linux-next until today.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maxime Ripard
AppliedQuoted 5 lines · Arnd Bergmann
Disabling
CONFIG_PMproduces a compile time warning when these functions are not referenced:
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1072:12: error: 'sun6i_dsi_runtime_suspend' defined but not used [-Werror=unused-function]
static intsun6i_dsi_runtime_suspend(struct device *dev)
Quoted 7 lines
^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1043:12: error: 'sun6i_dsi_runtime_resume' defined but not used [-Werror=unused-function] static int sun6i_dsi_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~Fixes 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support")Signed-off-by Arnd Bergmann <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180528/a89240b5/attachment.sig>