Re: [PATCH] drm/vc4: tests: Fix UAF in the mock helpers
On Tue, 24 Oct 2023 at 18:38, Maíra Canal wrote: > > On 10/24/23 07:56, Maxime Ripard wrote: > > The VC4 mock helpers allocate the CRTC, encoders and connectors using a > > call to kunit_kzalloc(), but the DRM device they are attache to survives > > for longer than the test itself which leads to use-after-frees reported > > by KASAN. > > > > Switch to drmm_kzalloc to tie the lifetime of these objects to the main > > DRM device. > > > > Fixes: f759f5b53f1c ("drm/vc4: tests: Introduce a mocking infrastructure") > > Closes: > > https://lore.kernel.org/all/ca+g9fyvja2hgqzr9lggq63v0skauejhae6f7+z9cwwn-our...@mail.gmail.com/ > > Reported-by: Linux Kernel Functional Testing > > Signed-off-by: Maxime Ripard > > Reviewed-by: Maíra Canal Tested-by: Anders Roxell I tested this patch ontop of next-20231025 and on next-20231011 when we first saw the issue, both kernels booted fine on a RPI4(bcm2711-rpi-4-b) Cheers, Anders > > Best Regards, > - Maíra Canal > > > > > --- > > > > Cc: Naresh Kamboju > > Cc: Dan Carpenter > > --- > > drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c | 2 +- > > drivers/gpu/drm/vc4/tests/vc4_mock_output.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c > > b/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c > > index 5d12d7beef0e..ade3309ae042 100644 > > --- a/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c > > +++ b/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c > > @@ -26,7 +26,7 @@ struct vc4_dummy_crtc *vc4_mock_pv(struct kunit *test, > > struct vc4_crtc *vc4_crtc; > > int ret; > > > > - dummy_crtc = kunit_kzalloc(test, sizeof(*dummy_crtc), GFP_KERNEL); > > + dummy_crtc = drmm_kzalloc(drm, sizeof(*dummy_crtc), GFP_KERNEL); > > KUNIT_ASSERT_NOT_NULL(test, dummy_crtc); > > > > vc4_crtc = _crtc->crtc; > > diff --git a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c > > b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c > > index 6e11fcc9ef45..e70d7c3076ac 100644 > > --- a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c > > +++ b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c > > @@ -32,7 +32,7 @@ struct vc4_dummy_output *vc4_dummy_output(struct kunit > > *test, > > struct drm_encoder *enc; > > int ret; > > > > - dummy_output = kunit_kzalloc(test, sizeof(*dummy_output), GFP_KERNEL); > > + dummy_output = drmm_kzalloc(drm, sizeof(*dummy_output), GFP_KERNEL); > > KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dummy_output); > > dummy_output->encoder.type = vc4_encoder_type; > >
Re: [PATCH v2] drm/amd/display: fix DSC related non-x86/PPC64 compilation issue
On Thu, 11 Aug 2022 at 20:00, Hamza Mahfooz wrote: > > Need to protect DSC code with CONFIG_DRM_AMD_DC_DCN. > Fixes the following build errors on arm64: > ERROR: modpost: "dc_dsc_get_policy_for_timing" > [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > ERROR: modpost: "dc_dsc_compute_bandwidth_range" > [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > > Fixes: 0087990a9f57 ("drm/amd/display: consider DSC pass-through during mode > validation") > Reported-by: Anders Roxell > Signed-off-by: Hamza Mahfooz Thank you for the quick fix. Tested-by: Anders Roxell Cheers, Anders > --- > v2: Fix WERROR build failure by guarding unused variables > --- > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > index ef6c94cd852b..ce6929224a6e 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c > @@ -1387,8 +1387,6 @@ bool pre_validate_dsc(struct drm_atomic_state *state, > return (ret == 0); > } > > -#endif > - > static unsigned int kbps_from_pbn(unsigned int pbn) > { > unsigned int kbps = pbn; > @@ -1416,17 +1414,19 @@ static bool is_dsc_common_config_possible(struct > dc_stream_state *stream, > > return bw_range->max_target_bpp_x16 && bw_range->min_target_bpp_x16; > } > +#endif /* CONFIG_DRM_AMD_DC_DCN */ > > enum dc_status dm_dp_mst_is_port_support_mode( > struct amdgpu_dm_connector *aconnector, > struct dc_stream_state *stream) > { > + int bpp, pbn, branch_max_throughput_mps = 0; > +#if defined(CONFIG_DRM_AMD_DC_DCN) > struct dc_link_settings cur_link_settings; > unsigned int end_to_end_bw_in_kbps = 0; > unsigned int upper_link_bw_in_kbps = 0, down_link_bw_in_kbps = 0; > unsigned int max_compressed_bw_in_kbps = 0; > struct dc_dsc_bw_range bw_range = {0}; > - int bpp, pbn, branch_max_throughput_mps = 0; > > /* > * check if the mode could be supported if DSC pass-through is > supported > @@ -1461,13 +1461,16 @@ enum dc_status dm_dp_mst_is_port_support_mode( > return DC_FAIL_BANDWIDTH_VALIDATE; > } > } else { > +#endif > /* check if mode could be supported within full_pbn */ > bpp = > convert_dc_color_depth_into_bpc(stream->timing.display_color_depth) * 3; > pbn = drm_dp_calc_pbn_mode(stream->timing.pix_clk_100hz / 10, > bpp, false); > > if (pbn > aconnector->port->full_pbn) > return DC_FAIL_BANDWIDTH_VALIDATE; > +#if defined(CONFIG_DRM_AMD_DC_DCN) > } > +#endif > > /* check is mst dsc output bandwidth branch_overall_throughput_0_mps > */ > switch (stream->timing.pixel_encoding) { > -- > 2.37.1 >
Re: [PATCH v2 2/3] drm/amd/display: consider DSC pass-through during mode validation
On 2022-08-05 17:13, Hamza Mahfooz wrote: > Add a mode validation routine for DSC pass-through. Both the link from > source to hub, and the link from hub to monitor are checked, according > to the current link training result and full pbn returned by enum path > resource sideband message. > > Pick up the minimum value as the bandwidth bottleneck for the end to > end link bandwidth constraint, and check if the maximum DSC decompression > bandwidth can fit. > > Co-authored-by: Fangzhi Zuo > Signed-off-by: Hamza Mahfooz Hi, Building an arm64 allmodconfig kernel from todays next tag, next-20220811. I can see the following build error. ERROR: modpost: "dc_dsc_compute_bandwidth_range" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "dc_dsc_get_policy_for_timing" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! When I reverted this patch I was able to build an arm64 allmodconfig kernel. Cheers, Anders
[PATCH v3 2/2] drm/msm/gpu: Cancel idle/boost work on suspend
com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220108180913.814448-1-robdcl...@gmail.com> References: <20220108180913.814448-1-robdcl...@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-requ...@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-requ...@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-requ...@lists.freedesktop.org?subject=subscribe> Cc: Rob Clark , David Airlie , linux-arm-...@vger.kernel.org, Abhinav Kumar , open list , Sean Paul , freedr...@lists.freedesktop.org Errors-To: dri-devel-boun...@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark > With system suspend using pm_runtime_force_suspend() we can't rely on > the pm_runtime_get_if_in_use() trick to deal with devfreq callbacks > after (or racing with) suspend. So flush any pending idle or boost > work in the suspend path. While booting Linux mainline on arm64 qcom db410c device the following kernel NULL pointer dereference noticed due to this patch [1] drm/msm/gpu: Cancel idle/boost work on suspend [ 17.207382] Unable to handle kernel NULL pointer dereference at virtual address 0010 [ 17.207755] Mem abort info: [ 17.215915] ESR = 0x9604 [ 17.217903] EC = 0x25: DABT (current EL), IL = 32 bits [ 17.225033] SET = 0, FnV = 0 [ 17.226501] EA = 0, S1PTW = 0 [ 17.233147] FSC = 0x04: level 0 translation fault [ 17.22] Data abort info: [ 17.238135] ISV = 0, ISS = 0x0004 [ 17.240720] CM = 0, WnR = 0 [ 17.244061] user pgtable: 4k pages, 48-bit VAs, pgdp=8e7b9000 [ 17.247323] [0010] pgd=08008e790003, p4d=08008e790003, pud=08008c2aa003, pmd= [ 17.254369] Internal error: Oops: 9604 [#1] PREEMPT SMP [ 17.264042] Modules linked in: crct10dif_ce qcom_wcnss_pil adv7511(+) cec qcom_pon rtc_pm8xxx qcom_spmi_temp_alarm qcom_spmi_vadc qcom_vadc_common snd_soc_msm8916_digital snd_soc_msm8916_analog qcom_camss snd_soc_apq8016_sbc snd_soc_lpass_apq8016 snd_soc_lpass_cpu qcom_q6v5_mss qcom_pil_info snd_soc_lpass_platform qcom_q6v5 snd_soc_qcom_common msm videobuf2_dma_sg qcom_sysmon venus_core qcom_common v4l2_fwnode qcom_rng qcom_glink_smem v4l2_async v4l2_mem2mem qmi_helpers qnoc_msm8916 gpu_sched mdt_loader videobuf2_memops qcom_stats videobuf2_v4l2 videobuf2_common i2c_qcom_cci display_connector icc_smd_rpm drm_kms_helper rpmsg_char socinfo rfkill rmtfs_mem drm qrtr fuse [ 17.306825] CPU: 2 PID: 67 Comm: kworker/2:2 Not tainted 5.17.0-rc1 #1 [ 17.328796] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 17.335137] Workqueue: pm pm_runtime_work [ 17.341979] pstate: 6005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 17.345896] pc : hrtimer_active+0x14/0x80 [ 17.352652] lr : hrtimer_cancel+0x28/0x70 Reported-by: Linux Kernel Functional Testing Reported-by: Anders Roxell kernel crash log links [2][3]. Cheers, Anders [1] https://lore.kernel.org/all/20220108180913.814448-3-robdcl...@gmail.com/ [2] https://lkft.validation.linaro.org/scheduler/job/4422191#L2360 [3] https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v5.17-rc1-230-g145d9b498fc8/testrun/7713584/suite/linux-log-parser/test/check-kernel-oops-4422047/log
[PATCH] drm/dp-mst: remove unused variable
The variable 'dev' is no longer used and the compiler rightly complains that it should be removed. ../drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_atomic_get_mst_topology_state’: ../drivers/gpu/drm/drm_dp_mst_topology.c:4187:21: warning: unused variable ‘dev’ [-Wunused-variable] struct drm_device *dev = mgr->dev; ^~~ Rework to remove the unused variable. Fixes: 83fa9842afe7 ("drm/dp-mst: Drop connection_mutex check") Signed-off-by: Anders Roxell --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9364e4f42975..95e63309 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -4184,8 +4184,6 @@ EXPORT_SYMBOL(drm_dp_mst_topology_state_funcs); struct drm_dp_mst_topology_state *drm_atomic_get_mst_topology_state(struct drm_atomic_state *state, struct drm_dp_mst_topology_mgr *mgr) { - struct drm_device *dev = mgr->dev; - return to_dp_mst_topology_state(drm_atomic_get_private_obj_state(state, >base)); } EXPORT_SYMBOL(drm_atomic_get_mst_topology_state); -- 2.20.1
[PATCH] drm/mediatek: fix implicit function declaration
When building mtk_drm_drv.o the following build error is seen: ../drivers/gpu/drm/mediatek/mtk_drm_drv.c: In function ‘mtk_drm_kms_init’: ../drivers/gpu/drm/mediatek/mtk_drm_drv.c:291:8: error: implicit declaration of function ‘dma_set_max_seg_size’; did you mean ‘drm_rect_adjust_size’? [-Werror=implicit-function-declaration] ret = dma_set_max_seg_size(dma_dev, (unsigned int)DMA_BIT_MASK(32)); ^~~~ drm_rect_adjust_size ../drivers/gpu/drm/mediatek/mtk_drm_drv.c:291:52: error: implicit declaration of function ‘DMA_BIT_MASK’; did you mean ‘BIT_MASK’? [-Werror=implicit-function-declaration] ret = dma_set_max_seg_size(dma_dev, (unsigned int)DMA_BIT_MASK(32)); ^~~~ BIT_MASK Rework to add a missing include file 'linux/dma-mapping.h', because that is the (only) header file containing that declaration. Fixes: 07098e82 ("drm/mediatek: set DMA max segment size") Signed-off-by: Anders Roxell --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 54536176bcbb..352b81a7a670 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2] drm: mali-dp: Mark expected switch fall-through
Now that -Wimplicit-fallthrough is passed to GCC by default, the following warnings shows up: ../drivers/gpu/drm/arm/malidp_hw.c: In function ‘malidp_format_get_bpp’: ../drivers/gpu/drm/arm/malidp_hw.c:387:8: warning: this statement may fall through [-Wimplicit-fallthrough=] bpp = 30; ^~~~ ../drivers/gpu/drm/arm/malidp_hw.c:388:3: note: here case DRM_FORMAT_YUV420_10BIT: ^~~~ ../drivers/gpu/drm/arm/malidp_hw.c: In function ‘malidp_se_irq’: ../drivers/gpu/drm/arm/malidp_hw.c:1311:4: warning: this statement may fall through [-Wimplicit-fallthrough=] drm_writeback_signal_completion(>mw_connector, 0); ^ ../drivers/gpu/drm/arm/malidp_hw.c:1313:3: note: here case MW_START: ^~~~ Rework to add a 'break;' in a case that didn't have it so that the compiler doesn't warn about fall-through. Cc: sta...@vger.kernel.org # v5.2+ Fixes: b8207562abdd ("drm/arm/malidp: Specified the rotation memory requirements for AFBC YUV formats") Acked-by: Liviu Dudau Signed-off-by: Anders Roxell --- drivers/gpu/drm/arm/malidp_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 50af399d7f6f..380be66d4c6e 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -385,6 +385,7 @@ int malidp_format_get_bpp(u32 fmt) switch (fmt) { case DRM_FORMAT_VUY101010: bpp = 30; + break; case DRM_FORMAT_YUV420_10BIT: bpp = 15; break; @@ -1309,7 +1310,7 @@ static irqreturn_t malidp_se_irq(int irq, void *arg) break; case MW_RESTART: drm_writeback_signal_completion(>mw_connector, 0); - /* fall through to a new start */ + /* fall through - to a new start */ case MW_START: /* writeback started, need to emulate one-shot mode */ hw->disable_memwrite(hwdev); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2] video: fbdev: Mark expected switch fall-through
Now that -Wimplicit-fallthrough is passed to GCC by default, the following warnings shows up: ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_channel_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2086:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2087:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_overlay_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1596:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1597:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ Rework to address a warnings due to the enablement of -Wimplicit-fallthrough. Signed-off-by: Anders Roxell --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index ac0bcac9a865..c249763dbf0b 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1594,6 +1594,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2; @@ -2084,6 +2085,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2; -- 2.20.1
[PATCH 3/3] drm: msm: a3xx: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/msm/adreno/adreno_gpu.c: In function ‘adreno_submit’: ../drivers/gpu/drm/msm/adreno/adreno_gpu.c:429:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (priv->lastctx == ctx) ^ ../drivers/gpu/drm/msm/adreno/adreno_gpu.c:431:3: note: here case MSM_SUBMIT_CMD_BUF: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 9acbbc0f3232..8fea014f0dea 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -428,6 +428,7 @@ void adreno_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, /* ignore if there has not been a ctx switch: */ if (priv->lastctx == ctx) break; + /* Fall through */ case MSM_SUBMIT_CMD_BUF: OUT_PKT3(ring, adreno_is_a430(adreno_gpu) ? CP_INDIRECT_BUFFER_PFE : CP_INDIRECT_BUFFER_PFD, 2); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm: mali-dp: Mark expected switch fall-through
When fall-through warnings was enabled by default, commit d93512ef0f0e ("Makefile: Globally enable fall-through warning"), the following warnings was starting to show up: ../drivers/gpu/drm/arm/malidp_hw.c: In function ‘malidp_format_get_bpp’: ../drivers/gpu/drm/arm/malidp_hw.c:387:8: warning: this statement may fall through [-Wimplicit-fallthrough=] bpp = 30; ^~~~ ../drivers/gpu/drm/arm/malidp_hw.c:388:3: note: here case DRM_FORMAT_YUV420_10BIT: ^~~~ ../drivers/gpu/drm/arm/malidp_hw.c: In function ‘malidp_se_irq’: ../drivers/gpu/drm/arm/malidp_hw.c:1311:4: warning: this statement may fall through [-Wimplicit-fallthrough=] drm_writeback_signal_completion(>mw_connector, 0); ^ ../drivers/gpu/drm/arm/malidp_hw.c:1313:3: note: here case MW_START: ^~~~ Rework to add a 'break;' in a case that didn't have it so that the compiler doesn't warn about fall-through. Cc: sta...@vger.kernel.org # v4.9+ Fixes: b8207562abdd ("drm/arm/malidp: Specified the rotation memory requirements for AFBC YUV formats") Signed-off-by: Anders Roxell --- drivers/gpu/drm/arm/malidp_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 50af399d7f6f..dc5fff9af338 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -385,6 +385,7 @@ int malidp_format_get_bpp(u32 fmt) switch (fmt) { case DRM_FORMAT_VUY101010: bpp = 30; + break; case DRM_FORMAT_YUV420_10BIT: bpp = 15; break; @@ -1309,7 +1310,7 @@ static irqreturn_t malidp_se_irq(int irq, void *arg) break; case MW_RESTART: drm_writeback_signal_completion(>mw_connector, 0); - /* fall through to a new start */ + /* fall through */ case MW_START: /* writeback started, need to emulate one-shot mode */ hw->disable_memwrite(hwdev); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/3] drm: msm: a5xx: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function ‘a5xx_submit’: ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:150:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (priv->lastctx == ctx) ^ ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:152:3: note: here case MSM_SUBMIT_CMD_BUF: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index 1671db47aa57..71397ed3c99f 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -59,6 +59,7 @@ static void a5xx_submit_in_rb(struct msm_gpu *gpu, struct msm_gem_submit *submit case MSM_SUBMIT_CMD_CTX_RESTORE_BUF: if (priv->lastctx == ctx) break; + /* Fall through */ case MSM_SUBMIT_CMD_BUF: /* copy commands into RB: */ obj = submit->bos[submit->cmd[i].idx].obj; @@ -149,6 +150,7 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, case MSM_SUBMIT_CMD_CTX_RESTORE_BUF: if (priv->lastctx == ctx) break; + /* Fall through */ case MSM_SUBMIT_CMD_BUF: OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3); OUT_RING(ring, lower_32_bits(submit->cmd[i].iova)); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c: In function ‘a6xx_submit’: ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:116:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (priv->lastctx == ctx) ^ ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:118:3: note: here case MSM_SUBMIT_CMD_BUF: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index be39cf01e51e..644a6ee53f05 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -115,6 +115,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, case MSM_SUBMIT_CMD_CTX_RESTORE_BUF: if (priv->lastctx == ctx) break; + /* Fall through */ case MSM_SUBMIT_CMD_BUF: OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3); OUT_RING(ring, lower_32_bits(submit->cmd[i].iova)); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/2] drm: sun4i: tcon: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/sun4i/sun4i_tcon.c: In function ‘sun4i_tcon0_mode_set_dithering’: ../drivers/gpu/drm/sun4i/sun4i_tcon.c:316:7: warning: this statement may fall through [-Wimplicit-fallthrough=] val |= SUN4I_TCON0_FRM_CTL_MODE_B; ../drivers/gpu/drm/sun4i/sun4i_tcon.c:317:2: note: here case MEDIA_BUS_FMT_RGB666_1X18: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 690aeb822704..04c721d0d3b9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -316,6 +316,7 @@ static void sun4i_tcon0_mode_set_dithering(struct sun4i_tcon *tcon, /* R and B components are only 5 bits deep */ val |= SUN4I_TCON0_FRM_CTL_MODE_R; val |= SUN4I_TCON0_FRM_CTL_MODE_B; + /* Fall through */ case MEDIA_BUS_FMT_RGB666_1X18: case MEDIA_BUS_FMT_RGB666_1X7X3_SPWG: /* Fall through: enable dithering */ -- 2.20.1
[PATCH] video: fbdev: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warnings was starting to show up: ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_channel_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2086:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2087:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_overlay_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1596:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1597:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index ac0bcac9a865..c249763dbf0b 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1594,6 +1594,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2; @@ -2084,6 +2085,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2; -- 2.20.1
[PATCH 1/2] drm: sun4i: sun6i_mipi_dsi: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c: In function ‘sun6i_dsi_transfer’:../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:992:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (msg->rx_len == 1) { ^ ../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:997:2: note: here default: ^~~ Rework so that the compiler doesn't warn about fall-through. Change the if-statement so that we can move out 'break;' one level. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 472f73985deb..40ed21e527f9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -992,8 +992,10 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, case MIPI_DSI_DCS_READ: if (msg->rx_len == 1) { ret = sun6i_dsi_dcs_read(dsi, msg); - break; + } else { + ret = -EINVAL; } + break; default: ret = -EINVAL; -- 2.20.1
Re: [PATCH 5/8] drivers: media: coda: fix warning same module names
On Tue, 11 Jun 2019 at 18:18, Ezequiel Garcia wrote: > > > > On Tue, Jun 11, 2019, 1:01 PM Anders Roxell wrote: >> >> On Tue, 11 Jun 2019 at 10:21, Hans Verkuil wrote: >> > >> > On 6/11/19 10:15 AM, Philipp Zabel wrote: >> > > Hi, >> > > >> > > On Mon, 2019-06-10 at 13:14 +, Matt Redfearn wrote: >> > >> >> > >> On 10/06/2019 14:03, Anders Roxell wrote: >> > >>> On Thu, 6 Jun 2019 at 12:13, Hans Verkuil wrote: >> > >>>> >> > >>>> On 6/6/19 11:47 AM, Anders Roxell wrote: >> > >>>>> When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as >> > >>>>> loadable modules, we see the following warning: >> > >>>>> >> > >>>>> warning: same module names found: >> > >>>>>fs/coda/coda.ko >> > >>>>>drivers/media/platform/coda/coda.ko >> > >>>>> >> > >>>>> Rework so media coda matches the config fragment. Leaving CODA_FS as >> > >>>>> is >> > >>>>> since thats a well known module. >> > >>>>> >> > >>>>> Signed-off-by: Anders Roxell >> > >>>>> --- >> > >>>>> drivers/media/platform/coda/Makefile | 4 ++-- >> > >>>>> 1 file changed, 2 insertions(+), 2 deletions(-) >> > >>>>> >> > >>>>> diff --git a/drivers/media/platform/coda/Makefile >> > >>>>> b/drivers/media/platform/coda/Makefile >> > >>>>> index 54e9a73a92ab..588e6bf7c190 100644 >> > >>>>> --- a/drivers/media/platform/coda/Makefile >> > >>>>> +++ b/drivers/media/platform/coda/Makefile >> > >>>>> @@ -1,6 +1,6 @@ >> > >>>>> # SPDX-License-Identifier: GPL-2.0-only >> > >>>>> >> > >>>>> -coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o >> > >>>>> coda-mpeg2.o coda-mpeg4.o coda-jpeg.o >> > >>>>> +video-coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o >> > >>>>> coda-mpeg2.o coda-mpeg4.o coda-jpeg.o >> > >>>>> >> > >>>>> -obj-$(CONFIG_VIDEO_CODA) += coda.o >> > >>>>> +obj-$(CONFIG_VIDEO_CODA) += video-coda.o >> > >>>> >> > >>>> How about imx-coda? video-coda suggests it is part of the video >> > >>>> subsystem, >> > >>>> which it isn't. >> > >>> >> > >>> I'll resend a v2 shortly with imx-coda instead. >> > > >> > > I'd be in favor of calling it "coda-vpu" instead. >> > >> > Fine by me! >> > >> > > >> > >> What about other vendor SoCs implementing the Coda IP block which are >> > >> not an imx? I'd prefer a more generic name - maybe media-coda. >> > > >> > > Right, this driver can be used on other SoCs [1]. >> > >> > Good point. >> >> OK, so I'll change it to 'media-coda'. >> >> >> > > As suggested by Philipp, coda-vpu seems the most accurate name. urgh, that correct. Thanks, Anders > > Thanks, > Ezequiel > > > >> Cheers, >> Anders >> >> > >> > Regards, >> > >> > Hans >> > >> > > >> > > [1] >> > > https://www.mail-archive.com/linux-media@vger.kernel.org/msg146498.html >> > > >> > > regards >> > > Philipp >> > > >> >
Re: [PATCH 5/8] drivers: media: coda: fix warning same module names
On Tue, 11 Jun 2019 at 10:21, Hans Verkuil wrote: > > On 6/11/19 10:15 AM, Philipp Zabel wrote: > > Hi, > > > > On Mon, 2019-06-10 at 13:14 +, Matt Redfearn wrote: > >> > >> On 10/06/2019 14:03, Anders Roxell wrote: > >>> On Thu, 6 Jun 2019 at 12:13, Hans Verkuil wrote: > >>>> > >>>> On 6/6/19 11:47 AM, Anders Roxell wrote: > >>>>> When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as > >>>>> loadable modules, we see the following warning: > >>>>> > >>>>> warning: same module names found: > >>>>>fs/coda/coda.ko > >>>>>drivers/media/platform/coda/coda.ko > >>>>> > >>>>> Rework so media coda matches the config fragment. Leaving CODA_FS as is > >>>>> since thats a well known module. > >>>>> > >>>>> Signed-off-by: Anders Roxell > >>>>> --- > >>>>> drivers/media/platform/coda/Makefile | 4 ++-- > >>>>> 1 file changed, 2 insertions(+), 2 deletions(-) > >>>>> > >>>>> diff --git a/drivers/media/platform/coda/Makefile > >>>>> b/drivers/media/platform/coda/Makefile > >>>>> index 54e9a73a92ab..588e6bf7c190 100644 > >>>>> --- a/drivers/media/platform/coda/Makefile > >>>>> +++ b/drivers/media/platform/coda/Makefile > >>>>> @@ -1,6 +1,6 @@ > >>>>> # SPDX-License-Identifier: GPL-2.0-only > >>>>> > >>>>> -coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o > >>>>> coda-mpeg2.o coda-mpeg4.o coda-jpeg.o > >>>>> +video-coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o > >>>>> coda-mpeg2.o coda-mpeg4.o coda-jpeg.o > >>>>> > >>>>> -obj-$(CONFIG_VIDEO_CODA) += coda.o > >>>>> +obj-$(CONFIG_VIDEO_CODA) += video-coda.o > >>>> > >>>> How about imx-coda? video-coda suggests it is part of the video > >>>> subsystem, > >>>> which it isn't. > >>> > >>> I'll resend a v2 shortly with imx-coda instead. > > > > I'd be in favor of calling it "coda-vpu" instead. > > Fine by me! > > > > >> What about other vendor SoCs implementing the Coda IP block which are > >> not an imx? I'd prefer a more generic name - maybe media-coda. > > > > Right, this driver can be used on other SoCs [1]. > > Good point. OK, so I'll change it to 'media-coda'. Cheers, Anders > > Regards, > > Hans > > > > > [1] https://www.mail-archive.com/linux-media@vger.kernel.org/msg146498.html > > > > regards > > Philipp > > >
Re: [PATCH 5/8] drivers: media: coda: fix warning same module names
On Thu, 6 Jun 2019 at 12:13, Hans Verkuil wrote: > > On 6/6/19 11:47 AM, Anders Roxell wrote: > > When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as > > loadable modules, we see the following warning: > > > > warning: same module names found: > > fs/coda/coda.ko > > drivers/media/platform/coda/coda.ko > > > > Rework so media coda matches the config fragment. Leaving CODA_FS as is > > since thats a well known module. > > > > Signed-off-by: Anders Roxell > > --- > > drivers/media/platform/coda/Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/platform/coda/Makefile > > b/drivers/media/platform/coda/Makefile > > index 54e9a73a92ab..588e6bf7c190 100644 > > --- a/drivers/media/platform/coda/Makefile > > +++ b/drivers/media/platform/coda/Makefile > > @@ -1,6 +1,6 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > > > -coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o coda-mpeg2.o > > coda-mpeg4.o coda-jpeg.o > > +video-coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o > > coda-mpeg2.o coda-mpeg4.o coda-jpeg.o > > > > -obj-$(CONFIG_VIDEO_CODA) += coda.o > > +obj-$(CONFIG_VIDEO_CODA) += video-coda.o > > How about imx-coda? video-coda suggests it is part of the video subsystem, > which it isn't. I'll resend a v2 shortly with imx-coda instead. Cheers, Anders > > Regards, > > Hans > > > obj-$(CONFIG_VIDEO_IMX_VDOA) += imx-vdoa.o > > >
Re: [PATCH 8/8] drivers: regulator: 88pm800: fix warning same module names
On Thu, 6 Jun 2019 at 13:00, Mark Brown wrote: > > On Thu, Jun 06, 2019 at 11:47:36AM +0200, Anders Roxell wrote: > > > obj-$(CONFIG_REGULATOR_88PG86X) += 88pg86x.o > > -obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o > > +obj-$(CONFIG_REGULATOR_88PM800) += 88pm800-regulator.o > > +88pm800-regulator-objs := 88pm800.o > > Don't do this, no need for this driver to look different to all the > others in the Makefile - just rename the whole file. Thank you for your review, I'll rework and resend v2 shortly. Cheers, Anders
Re: [PATCH 0/8] fix warnings for same module names
On Thu, 6 Jun 2019 at 12:11, Mauro Carvalho Chehab wrote: > > Em Thu, 6 Jun 2019 11:46:57 +0200 > Anders Roxell escreveu: > > > Hi, > > > > This patch set addresses warnings that module names are named the > > same, this may lead to a problem that wrong module gets loaded or if one > > of the two same-name modules exports a symbol, this can confuse the > > dependency resolution. and the build may fail. > > > > > > Patch "drivers: net: dsa: realtek: fix warning same module names" and > > "drivers: net: phy: realtek: fix warning same module names" resolves the > > name clatch realtek.ko. > > > > warning: same module names found: > > drivers/net/phy/realtek.ko > > drivers/net/dsa/realtek.ko > > > > > > Patch "drivers: (video|gpu): fix warning same module names" resolves > > the name clatch mxsfb.ko. > > > > warning: same module names found: > > drivers/video/fbdev/mxsfb.ko > > drivers/gpu/drm/mxsfb/mxsfb.ko > > > > Patch "drivers: media: i2c: fix warning same module names" resolves the > > name clatch adv7511.ko however, it seams to refer to the same device > > name in i2c_device_id, does anyone have any guidance how that should be > > solved? > > > > warning: same module names found: > > drivers/gpu/drm/bridge/adv7511/adv7511.ko > > drivers/media/i2c/adv7511.ko > > > > > > Patch "drivers: media: coda: fix warning same module names" resolves the > > name clatch coda.ko. > > > > warning: same module names found: > > fs/coda/coda.ko > > drivers/media/platform/coda/coda.ko > > Media change look ok, and probably the other patches too, but the > problem here is: who will apply it and when. > > The way you grouped the changes makes harder for subsystem maintainers > to pick, as the same patch touches multiple subsystems. > > On the other hand, if this gets picked by someone else, it has the > potential to cause conflicts between linux-next and the maintainer's > tree. > > So, the best would be if you re-arrange this series to submit one > patch per subsystem. I will send it per subsystem. Cheers, Anders > > > > > > > > Patch "drivers: net: phy: fix warning same module names" resolves the > > name clatch asix.ko. > > > > warning: same module names found: > > drivers/net/phy/asix.ko > > drivers/net/usb/asix.ko > > > > Patch "drivers: mfd: 88pm800: fix warning same module names" and > > "drivers: regulator: 88pm800: fix warning same module names" resolves > > the name clatch 88pm800.ko. > > > > warning: same module names found: > > drivers/regulator/88pm800.ko > > drivers/mfd/88pm800.ko > > > > > > Cheers, > > Anders > > > > Anders Roxell (8): > > drivers: net: dsa: realtek: fix warning same module names > > drivers: net: phy: realtek: fix warning same module names > > drivers: (video|gpu): fix warning same module names > > drivers: media: i2c: fix warning same module names > > drivers: media: coda: fix warning same module names > > drivers: net: phy: fix warning same module names > > drivers: mfd: 88pm800: fix warning same module names > > drivers: regulator: 88pm800: fix warning same module names > > > > drivers/gpu/drm/bridge/adv7511/Makefile | 10 +- > > drivers/gpu/drm/mxsfb/Makefile | 4 ++-- > > drivers/media/i2c/Makefile | 3 ++- > > drivers/media/platform/coda/Makefile| 4 ++-- > > drivers/mfd/Makefile| 7 +-- > > drivers/net/dsa/Makefile| 4 ++-- > > drivers/net/phy/Makefile| 6 -- > > drivers/regulator/Makefile | 3 ++- > > drivers/video/fbdev/Makefile| 3 ++- > > 9 files changed, 26 insertions(+), 18 deletions(-) > > > > > > Thanks, > Mauro
[PATCH 1/8] drivers: net: dsa: realtek: fix warning same module names
When building with CONFIG_NET_DSA_REALTEK_SMI and CONFIG_REALTEK_PHY enabled as loadable modules, we see the following warning: warning: same module names found: drivers/net/phy/realtek.ko drivers/net/dsa/realtek.ko Rework so the names matches the config fragment. Signed-off-by: Anders Roxell --- drivers/net/dsa/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile index fefb6aaa82ba..dbe8352cf8a4 100644 --- a/drivers/net/dsa/Makefile +++ b/drivers/net/dsa/Makefile @@ -9,8 +9,8 @@ obj-$(CONFIG_NET_DSA_LANTIQ_GSWIP) += lantiq_gswip.o obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o obj-$(CONFIG_NET_DSA_QCA8K)+= qca8k.o -obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o -realtek-objs := realtek-smi.o rtl8366.o rtl8366rb.o +obj-$(CONFIG_NET_DSA_REALTEK_SMI) += dsa-realtek-smi.o +dsa-realtek-smi-objs := realtek-smi.o rtl8366.o rtl8366rb.o obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o -- 2.20.1
[PATCH 4/8] drivers: media: i2c: fix warning same module names
When building with CONFIG_VIDEO_ADV7511 and CONFIG_DRM_I2C_ADV7511 enabled as loadable modules, we see the following warning: warning: same module names found: drivers/gpu/drm/bridge/adv7511/adv7511.ko drivers/media/i2c/adv7511.ko Rework so the names matches the config fragment. Signed-off-by: Anders Roxell --- This is only one issue that have been addressed. The other issue is that itseems to refer to the same device name in i2c_device_id, any guidance how that should be solved? Cheers, Anders drivers/gpu/drm/bridge/adv7511/Makefile | 10 +- drivers/media/i2c/Makefile | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/Makefile b/drivers/gpu/drm/bridge/adv7511/Makefile index b46ebeb35fd4..e367426bd73e 100644 --- a/drivers/gpu/drm/bridge/adv7511/Makefile +++ b/drivers/gpu/drm/bridge/adv7511/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -adv7511-y := adv7511_drv.o -adv7511-$(CONFIG_DRM_I2C_ADV7511_AUDIO) += adv7511_audio.o -adv7511-$(CONFIG_DRM_I2C_ADV7511_CEC) += adv7511_cec.o -adv7511-$(CONFIG_DRM_I2C_ADV7533) += adv7533.o -obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o +drm-i2c-adv7511-y := adv7511_drv.o +drm-i2c-adv7511-$(CONFIG_DRM_I2C_ADV7511_AUDIO) += adv7511_audio.o +drm-i2c-adv7511-$(CONFIG_DRM_I2C_ADV7511_CEC) += adv7511_cec.o +drm-i2c-adv7511-$(CONFIG_DRM_I2C_ADV7533) += adv7533.o +obj-$(CONFIG_DRM_I2C_ADV7511) += drm-i2c-adv7511.o diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index d8ad9dad495d..b71a427a89fd 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -35,7 +35,8 @@ obj-$(CONFIG_VIDEO_ADV748X) += adv748x/ obj-$(CONFIG_VIDEO_ADV7604) += adv7604.o obj-$(CONFIG_VIDEO_ADV7842) += adv7842.o obj-$(CONFIG_VIDEO_AD9389B) += ad9389b.o -obj-$(CONFIG_VIDEO_ADV7511) += adv7511.o +obj-$(CONFIG_VIDEO_ADV7511) += video-adv7511.o +video-adv7511-objs := adv7511.o obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o obj-$(CONFIG_VIDEO_VS6624) += vs6624.o obj-$(CONFIG_VIDEO_BT819) += bt819.o -- 2.20.1
[PATCH 5/8] drivers: media: coda: fix warning same module names
When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as loadable modules, we see the following warning: warning: same module names found: fs/coda/coda.ko drivers/media/platform/coda/coda.ko Rework so media coda matches the config fragment. Leaving CODA_FS as is since thats a well known module. Signed-off-by: Anders Roxell --- drivers/media/platform/coda/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda/Makefile b/drivers/media/platform/coda/Makefile index 54e9a73a92ab..588e6bf7c190 100644 --- a/drivers/media/platform/coda/Makefile +++ b/drivers/media/platform/coda/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o coda-mpeg2.o coda-mpeg4.o coda-jpeg.o +video-coda-objs := coda-common.o coda-bit.o coda-gdi.o coda-h264.o coda-mpeg2.o coda-mpeg4.o coda-jpeg.o -obj-$(CONFIG_VIDEO_CODA) += coda.o +obj-$(CONFIG_VIDEO_CODA) += video-coda.o obj-$(CONFIG_VIDEO_IMX_VDOA) += imx-vdoa.o -- 2.20.1
[PATCH 3/8] drivers: (video|gpu): fix warning same module names
When building with CONFIG_DRM_MXSFB and CONFIG_FB_MXS enabled as loadable modules, we see the following warning: warning: same module names found: drivers/video/fbdev/mxsfb.ko drivers/gpu/drm/mxsfb/mxsfb.ko Rework so the names matches the config fragment. Signed-off-by: Anders Roxell --- drivers/gpu/drm/mxsfb/Makefile | 4 ++-- drivers/video/fbdev/Makefile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/Makefile b/drivers/gpu/drm/mxsfb/Makefile index ff6e358088fa..5d49d7548e66 100644 --- a/drivers/gpu/drm/mxsfb/Makefile +++ b/drivers/gpu/drm/mxsfb/Makefile @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -mxsfb-y := mxsfb_drv.o mxsfb_crtc.o mxsfb_out.o -obj-$(CONFIG_DRM_MXSFB)+= mxsfb.o +drm-mxsfb-y := mxsfb_drv.o mxsfb_crtc.o mxsfb_out.o +obj-$(CONFIG_DRM_MXSFB)+= drm-mxsfb.o diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile index 655f2537cac1..7ee967525af2 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -131,7 +131,8 @@ obj-$(CONFIG_FB_VGA16)+= vga16fb.o obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_MX3) += mx3fb.o obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o -obj-$(CONFIG_FB_MXS) += mxsfb.o +obj-$(CONFIG_FB_MXS) += fb-mxs.o +fb-mxs-objs := mxsfb.o obj-$(CONFIG_FB_SSD1307) += ssd1307fb.o obj-$(CONFIG_FB_SIMPLE) += simplefb.o -- 2.20.1
[PATCH 7/8] drivers: mfd: 88pm800: fix warning same module names
When building with CONFIG_MFD_88PM800 and CONFIG_REGULATOR_88PM800 enabled as loadable modules, we see the following warning: warning: same module names found: drivers/regulator/88pm800.ko drivers/mfd/88pm800.ko Rework so the names matches the config fragment. Signed-off-by: Anders Roxell --- drivers/mfd/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 52b1a90ff515..5e870eef6a20 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -5,8 +5,11 @@ 88pm860x-objs := 88pm860x-core.o 88pm860x-i2c.o obj-$(CONFIG_MFD_88PM860X) += 88pm860x.o -obj-$(CONFIG_MFD_88PM800) += 88pm800.o 88pm80x.o -obj-$(CONFIG_MFD_88PM805) += 88pm805.o 88pm80x.o +obj-$(CONFIG_MFD_88PM800) += mfd-88pm800.o mfd-88pm80x.o +mfd-88pm800-objs := 88pm800.o +obj-$(CONFIG_MFD_88PM805) += mfd-88pm805.o mfd-88pm80x.o +mfd-88pm805-objs := 88pm805.o +mfd-88pm80x-objs := 88pm80x.o obj-$(CONFIG_MFD_ACT8945A) += act8945a.o obj-$(CONFIG_MFD_SM501)+= sm501.o obj-$(CONFIG_MFD_ASIC3)+= asic3.o tmio_core.o -- 2.20.1
[PATCH 8/8] drivers: regulator: 88pm800: fix warning same module names
When building with CONFIG_MFD_88PM800 and CONFIG_REGULATOR_88PM800 enabled as loadable modules, we see the following warning: warning: same module names found: drivers/regulator/88pm800.ko drivers/mfd/88pm800.ko Rework to rename the name. Signed-off-by: Anders Roxell --- drivers/regulator/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 76e78fa449a2..6906938071f5 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -11,7 +11,8 @@ obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o obj-$(CONFIG_REGULATOR_88PG86X) += 88pg86x.o -obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o +obj-$(CONFIG_REGULATOR_88PM800) += 88pm800-regulator.o +88pm800-regulator-objs := 88pm800.o obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o obj-$(CONFIG_REGULATOR_CPCAP) += cpcap-regulator.o obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o -- 2.20.1
[PATCH 6/8] drivers: net: phy: fix warning same module names
When building with CONFIG_ASIX_PHY and CONFIG_USB_NET_AX8817X enabled as loadable modules, we see the following warning: warning: same module names found: drivers/net/phy/asix.ko drivers/net/usb/asix.ko Rework so media coda matches the config fragment. Leaving CONFIG_USB_NET_AX8817X as is since thats a well known module. Signed-off-by: Anders Roxell --- drivers/net/phy/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 947c974bc69e..bab179b75a2a 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -52,7 +52,8 @@ ifdef CONFIG_HWMON aquantia-objs += aquantia_hwmon.o endif obj-$(CONFIG_AQUANTIA_PHY) += aquantia.o -obj-$(CONFIG_ASIX_PHY) += asix.o +obj-$(CONFIG_ASIX_PHY) += asix-phy.o +asix-phy-objs := asix.o obj-$(CONFIG_AT803X_PHY) += at803x.o obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o -- 2.20.1
[PATCH 0/8] fix warnings for same module names
Hi, This patch set addresses warnings that module names are named the same, this may lead to a problem that wrong module gets loaded or if one of the two same-name modules exports a symbol, this can confuse the dependency resolution. and the build may fail. Patch "drivers: net: dsa: realtek: fix warning same module names" and "drivers: net: phy: realtek: fix warning same module names" resolves the name clatch realtek.ko. warning: same module names found: drivers/net/phy/realtek.ko drivers/net/dsa/realtek.ko Patch "drivers: (video|gpu): fix warning same module names" resolves the name clatch mxsfb.ko. warning: same module names found: drivers/video/fbdev/mxsfb.ko drivers/gpu/drm/mxsfb/mxsfb.ko Patch "drivers: media: i2c: fix warning same module names" resolves the name clatch adv7511.ko however, it seams to refer to the same device name in i2c_device_id, does anyone have any guidance how that should be solved? warning: same module names found: drivers/gpu/drm/bridge/adv7511/adv7511.ko drivers/media/i2c/adv7511.ko Patch "drivers: media: coda: fix warning same module names" resolves the name clatch coda.ko. warning: same module names found: fs/coda/coda.ko drivers/media/platform/coda/coda.ko Patch "drivers: net: phy: fix warning same module names" resolves the name clatch asix.ko. warning: same module names found: drivers/net/phy/asix.ko drivers/net/usb/asix.ko Patch "drivers: mfd: 88pm800: fix warning same module names" and "drivers: regulator: 88pm800: fix warning same module names" resolves the name clatch 88pm800.ko. warning: same module names found: drivers/regulator/88pm800.ko drivers/mfd/88pm800.ko Cheers, Anders Anders Roxell (8): drivers: net: dsa: realtek: fix warning same module names drivers: net: phy: realtek: fix warning same module names drivers: (video|gpu): fix warning same module names drivers: media: i2c: fix warning same module names drivers: media: coda: fix warning same module names drivers: net: phy: fix warning same module names drivers: mfd: 88pm800: fix warning same module names drivers: regulator: 88pm800: fix warning same module names drivers/gpu/drm/bridge/adv7511/Makefile | 10 +- drivers/gpu/drm/mxsfb/Makefile | 4 ++-- drivers/media/i2c/Makefile | 3 ++- drivers/media/platform/coda/Makefile| 4 ++-- drivers/mfd/Makefile| 7 +-- drivers/net/dsa/Makefile| 4 ++-- drivers/net/phy/Makefile| 6 -- drivers/regulator/Makefile | 3 ++- drivers/video/fbdev/Makefile| 3 ++- 9 files changed, 26 insertions(+), 18 deletions(-) -- 2.20.1
[PATCH] drm/tegra: vic: fix implicit function declaration warning
When CONFIG_IOMMU_API isn't set the following warnings pops up: drivers/gpu/drm/tegra/vic.c: In function ‘vic_boot’: drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’? [-Werror=implicit-function-declaration] struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev); ^~~~ iommu_fwspec_free drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of ‘struct iommu_fwspec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] drivers/gpu/drm/tegra/vic.c:117:19: error: ‘struct iommu_fwspec’ has no member named ‘num_ids’ if (spec && spec->num_ids > 0) { ^~ drivers/gpu/drm/tegra/vic.c:118:16: error: ‘struct iommu_fwspec’ has no member named ‘ids’ value = spec->ids[0] & 0x; ^~ Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block. Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming") Signed-off-by: Anders Roxell --- drivers/gpu/drm/tegra/vic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index 39bfed9623de..982ce37ecde1 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -106,6 +106,7 @@ static int vic_boot(struct vic *vic) if (vic->booted) return 0; +#ifdef CONFIG_IOMMU_API if (vic->config->supports_sid) { struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev); u32 value; @@ -121,6 +122,7 @@ static int vic_boot(struct vic *vic) vic_writel(vic, value, VIC_THI_STREAMID1); } } +#endif /* setup clockgating registers */ vic_writel(vic, CG_IDLE_CG_DLY_CNT(4) | -- 2.19.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] fbdev: omap2: fix warnings in dss core
Commit 60d2fa0dad06 ("fbdev: omap2: no need to check return value of debugfs_create functions") changed the declaration of the return value of function dss_debugfs_create_file() and the following two warnings appeared: drivers/video/fbdev/omap2/omapfb/dss/core.c: In function ‘dss_debugfs_create_file’: drivers/video/fbdev/omap2/omapfb/dss/core.c:139:9: warning: ‘return’ with a value, in function returning void return 0; ^ drivers/video/fbdev/omap2/omapfb/dss/core.c: In function ‘omap_dss_probe’: drivers/video/fbdev/omap2/omapfb/dss/core.c:172:6: warning: unused variable ‘r’ [-Wunused-variable] int r; ^ Rework so function dss_debugfs_create_file() that is declared to return void don't 'return 0' and remove the declaration of the unused variable 'r'. Signed-off-by: Anders Roxell --- drivers/video/fbdev/omap2/omapfb/dss/core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c index 7e6a3eb266d0..b5956a1a30d4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c @@ -136,7 +136,6 @@ static inline void dss_uninitialize_debugfs(void) } void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) { - return 0; } #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ @@ -169,8 +168,6 @@ static struct notifier_block omap_dss_pm_notif_block = { static int __init omap_dss_probe(struct platform_device *pdev) { - int r; - core.pdev = pdev; dss_features_init(omapdss_get_version()); -- 2.19.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/msm: avoid unused function warning
From: Arnd Bergmann drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:368:13: error: 'dpu_plane_danger_signal_ctrl' defined but not used [-Werror=unused-function] Fixes: 7b2e7adea732 ("drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void") Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 26 +++ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index fd75870eb17f..6aefcd6db46b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -365,19 +365,6 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane, >pipe_qos_cfg); } -static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) -{ - struct dpu_plane *pdpu = to_dpu_plane(plane); - struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); - - if (!pdpu->is_rt_pipe) - return; - - pm_runtime_get_sync(_kms->pdev->dev); - _dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL); - pm_runtime_put_sync(_kms->pdev->dev); -} - /** * _dpu_plane_set_ot_limit - set OT limit for the given plane * @plane: Pointer to drm plane @@ -1248,6 +1235,19 @@ static void dpu_plane_reset(struct drm_plane *plane) } #ifdef CONFIG_DEBUG_FS +static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) +{ + struct dpu_plane *pdpu = to_dpu_plane(plane); + struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); + + if (!pdpu->is_rt_pipe) + return; + + pm_runtime_get_sync(_kms->pdev->dev); + _dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL); + pm_runtime_put_sync(_kms->pdev->dev); +} + static ssize_t _dpu_plane_danger_read(struct file *file, char __user *buff, size_t count, loff_t *ppos) { -- 2.19.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/sun4i: tcon: fix false-positive uninitialized build warning
With GCC version 5 and 6, this uninitialized warning can be seen. GCC have been fixed in newer versions. drivers/gpu/drm/sun4i/sun4i_tcon.c: In function ‘sun4i_tcon_bind’: drivers/gpu/drm/sun4i/sun4i_tcon.c:1091:21: warning: ‘has_lvds_alt’ may be used uninitialized in this function [-Wmaybe-uninitialized] bool has_lvds_rst, has_lvds_alt, can_lvds; ^~~~ Reworked the code so it covers that false positive also. Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 0420f5c978b9..317d4fa3429c 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -1161,20 +1161,20 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master, */ if (tcon->quirks->has_lvds_alt) { tcon->lvds_pll = devm_clk_get(dev, "lvds-alt"); - if (IS_ERR(tcon->lvds_pll)) { - if (PTR_ERR(tcon->lvds_pll) == -ENOENT) { - has_lvds_alt = false; - } else { - dev_err(dev, "Couldn't get the LVDS PLL\n"); - return PTR_ERR(tcon->lvds_pll); - } + ret = PTR_ERR_OR_ZERO(tcon->lvds_pll); + if (ret == -ENOENT) { + has_lvds_alt = false; + } else if (ret) { + dev_err(dev, "Couldn't get the LVDS PLL\n"); + return ret; } else { has_lvds_alt = true; } + } else { + has_lvds_alt = false; } - if (!has_lvds_rst || - (tcon->quirks->has_lvds_alt && !has_lvds_alt)) { + if (!has_lvds_rst || !has_lvds_alt) { dev_warn(dev, "Missing LVDS properties, Please upgrade your DT\n"); dev_warn(dev, "LVDS output disabled\n"); can_lvds = false; -- 2.19.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture
When CONFIG_DEV_COREDUMP isn't defined msm_gpu_crashstate_capture doesn't pass the correct parameters. drivers/gpu/drm/msm/msm_gpu.c: In function ‘recover_worker’: drivers/gpu/drm/msm/msm_gpu.c:479:34: error: passing argument 2 of ‘msm_gpu_crashstate_capture’ from incompatible pointer type [-Werror=incompatible-pointer-types] msm_gpu_crashstate_capture(gpu, submit, comm, cmd); ^~ drivers/gpu/drm/msm/msm_gpu.c:388:13: note: expected ‘char *’ but argument is of type ‘struct msm_gem_submit *’ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm, ^~ drivers/gpu/drm/msm/msm_gpu.c:479:2: error: too many arguments to function ‘msm_gpu_crashstate_capture’ msm_gpu_crashstate_capture(gpu, submit, comm, cmd); ^~ drivers/gpu/drm/msm/msm_gpu.c:388:13: note: declared here static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm, In current code the function msm_gpu_crashstate_capture parameters. Fixes: cdb95931dea3 ("drm/msm/gpu: Add the buffer objects from the submit to the crash dump") Signed-off-by: Anders Roxell --- drivers/gpu/drm/msm/msm_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index f388944c93e2..713a92b516ba 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -385,8 +385,8 @@ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, msm_gpu_devcoredump_read, msm_gpu_devcoredump_free); } #else -static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm, - char *cmd) +static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, + struct msm_gem_submit *submit, char *comm, char *cmd) { } #endif -- 2.18.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/bridge: cdns-dsi: mark PM functions as __maybe_unused
The suspend/resume callbacks are now optional, leading to a warning when they are unused: drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: warning: ‘cdns_dsi_suspend’ defined but not used [-Wunused-function] static int cdns_dsi_suspend(struct device *dev) ^~~~ drivers/gpu/drm/bridge/cdns-dsi.c:1340:12: warning: ‘cdns_dsi_resume’ defined but not used [-Wunused-function] static int cdns_dsi_resume(struct device *dev) ^~~ This marks the functions as __maybe_unused to avoid the warning. Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver") Signed-off-by: Anders Roxell <anders.rox...@linaro.org> --- drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c index c255fc3e1be5..f2d43f24acfb 100644 --- a/drivers/gpu/drm/bridge/cdns-dsi.c +++ b/drivers/gpu/drm/bridge/cdns-dsi.c @@ -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); -- 2.17.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drivers: omap2: Kconfig: make FB_OMAP2_DSS_INIT depend on OF
Commit 7378f1149884 ("media: omap2: omapfb: allow building it with COMPILE_TEST") broke compilation without CONFIG_OF selected. CC drivers/video/fbdev/core/fbmem.o drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c: In function ‘omapdss_update_prop’: drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:68:2: error: implicit declaration of function ‘of_update_property’; did you mean ‘of_get_property’? [-Werror=implicit-function-declaration] of_update_property(node, prop); ^~ of_get_property cc1: some warnings being treated as errors scripts/Makefile.build:312: recipe for target 'drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.o' failed make[7]: *** [drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.o] Error 1 scripts/Makefile.build:559: recipe for target 'drivers/video/fbdev/omap2/omapfb/dss' failed make[6]: *** [drivers/video/fbdev/omap2/omapfb/dss] Error 2 make[6]: *** Waiting for unfinished jobs Add OF dependency in order to make all configurations work again. of_update_property() has no inline stub, and that that could be added as an alternative. Signed-off-by: Anders Roxell <anders.rox...@linaro.org> --- drivers/video/fbdev/omap2/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/Kconfig b/drivers/video/fbdev/omap2/Kconfig index 82008699d253..4de381f2452e 100644 --- a/drivers/video/fbdev/omap2/Kconfig +++ b/drivers/video/fbdev/omap2/Kconfig @@ -1,4 +1,4 @@ -if ARCH_OMAP2PLUS || COMPILE_TEST +if OF && (ARCH_OMAP2PLUS || COMPILE_TEST) source "drivers/video/fbdev/omap2/omapfb/Kconfig" -- 2.17.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] gpu/drm/amd/amdkfd: fix build, select MMU_NOTIFIER
On 14 April 2018 at 04:49, Randy Dunlap <rdun...@infradead.org> wrote: > From: Randy Dunlap <rdun...@infradead.org> > > When CONFIG_MMU_NOTIFIER is not enabled, struct mmu_notifier has an > incomplete type definition, which causes build errors. > > ../drivers/gpu/drm/amd/amdkfd/kfd_priv.h:607:22: error: field 'mmu_notifier' > has incomplete type > ../include/linux/kernel.h:979:32: error: dereferencing pointer to incomplete > type > ../include/linux/kernel.h:980:18: error: dereferencing pointer to incomplete > type > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:434:2: error: implicit > declaration of function 'mmu_notifier_unregister_no_release' > [-Werror=implicit-function-declaration] > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:435:2: error: implicit > declaration of function 'mmu_notifier_call_srcu' > [-Werror=implicit-function-declaration] > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:438:21: error: variable > 'kfd_process_mmu_notifier_ops' has initializer but incomplete type > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: error: unknown field > 'release' specified in initializer > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: excess elements > in struct initializer [enabled by default] > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: (near > initialization for 'kfd_process_mmu_notifier_ops') [enabled by default] > ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit > declaration of function 'mmu_notifier_register' > [-Werror=implicit-function-declaration] > > Signed-off-by: Randy Dunlap <rdun...@infradead.org> > Cc: Oded Gabbay <oded.gab...@gmail.com> > Cc: dri-devel@lists.freedesktop.org Tested-by: Anders Roxell <anders.rox...@linaro.org> > --- > From linux-next, not mmotm, but found in mmotm builds. > > drivers/gpu/drm/amd/amdkfd/Kconfig |1 + > 1 file changed, 1 insertion(+) > > --- mmotm-2018-0413-1728.orig/drivers/gpu/drm/amd/amdkfd/Kconfig > +++ mmotm-2018-0413-1728/drivers/gpu/drm/amd/amdkfd/Kconfig > @@ -6,5 +6,6 @@ config HSA_AMD > tristate "HSA kernel driver for AMD GPU devices" > depends on DRM_AMDGPU && X86_64 > imply AMD_IOMMU_V2 > + select MMU_NOTIFIER > help > Enable this if you want to use HSA features on AMD GPU devices. > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] amdkfd: always select MMU_NOTIFIER
On 28 March 2018 at 18:04, Christian König <christian.koe...@amd.com> wrote: > Am 28.03.2018 um 17:53 schrieb Arnd Bergmann: >> >> Building amdkfd without MMU notifiers is broken: >> >> In file included from drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c:28: >> drivers/gpu/drm/amd/amdkfd/kfd_priv.h:584:22: error: field 'mmu_notifier' >> has incomplete type >> >> This adds the missing 'select MMU_NOTIFIER' line to make it build >> cleanly all the time. >> >> Signed-off-by: Arnd Bergmann <a...@arndb.de> > > > Acked-by: Christian König <christian.koe...@amd.com>, but I would wait on > what Felix says to that. Tested-by: Anders Roxell <anders.rox...@linaro.org> Randy sent the same patch [1] and its still required. Cheers, Anders [1] https://patchwork.kernel.org/patch/10340885/ > > >> --- >> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig >> b/drivers/gpu/drm/amd/amdkfd/Kconfig >> index ed2f06c9f346..5a26acb90e19 100644 >> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig >> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig >> @@ -4,6 +4,7 @@ >> config HSA_AMD >> tristate "HSA kernel driver for AMD GPU devices" >> + select MMU_NOTIFIER >> depends on DRM_AMDGPU && X86_64 >> imply AMD_IOMMU_V2 >> help > > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel