Skip to content

Commit e1f9c84

Browse files
committed
Merge tag 'mediatek-drm-next-6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next
Mediatek DRM Next for Linux 6.6 1. Small mtk-dpi cleanups 2. DisplayPort: support eDP and aux-bus 3. Fix uninitialized symbol 4. Do not check for 0 return after calling platform_get_irq() 5. Convert to platform remove callback returning void 6. Fix coverity issues 7. Fix potential memory leak if vmap() fail 8. Fix void-pointer-to-enum-cast warning 9. Rid W=1 warnings from GPU Signed-off-by: Dave Airlie <airlied@redhat.com> From: Chun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230813152726.14802-1-chunkuang.hu@kernel.org
2 parents 57bca71 + fb7e600 commit e1f9c84

21 files changed

+326
-274
lines changed

drivers/gpu/drm/mediatek/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config DRM_MEDIATEK_DP
2626
select PHY_MTK_DP
2727
select DRM_DISPLAY_HELPER
2828
select DRM_DISPLAY_DP_HELPER
29+
select DRM_DP_AUX_BUS
2930
help
3031
DRM/KMS Display Port driver for MediaTek SoCs.
3132

drivers/gpu/drm/mediatek/mtk_cec.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,12 @@ static int mtk_cec_probe(struct platform_device *pdev)
235235
return 0;
236236
}
237237

238-
static int mtk_cec_remove(struct platform_device *pdev)
238+
static void mtk_cec_remove(struct platform_device *pdev)
239239
{
240240
struct mtk_cec *cec = platform_get_drvdata(pdev);
241241

242242
mtk_cec_htplg_irq_disable(cec);
243243
clk_disable_unprepare(cec->clk);
244-
return 0;
245244
}
246245

247246
static const struct of_device_id mtk_cec_of_ids[] = {
@@ -252,7 +251,7 @@ MODULE_DEVICE_TABLE(of, mtk_cec_of_ids);
252251

253252
struct platform_driver mtk_cec_driver = {
254253
.probe = mtk_cec_probe,
255-
.remove = mtk_cec_remove,
254+
.remove_new = mtk_cec_remove,
256255
.driver = {
257256
.name = "mediatek-cec",
258257
.of_match_table = mtk_cec_of_ids,

drivers/gpu/drm/mediatek/mtk_disp_aal.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ struct mtk_disp_aal_data {
2525
bool has_gamma;
2626
};
2727

28-
/**
29-
* struct mtk_disp_aal - DISP_AAL driver structure
30-
* @ddp_comp - structure containing type enum and hardware resources
31-
* @crtc - associated crtc to report irq events to
32-
*/
3328
struct mtk_disp_aal {
3429
struct clk *clk;
3530
void __iomem *regs;
@@ -139,11 +134,9 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
139134
return ret;
140135
}
141136

142-
static int mtk_disp_aal_remove(struct platform_device *pdev)
137+
static void mtk_disp_aal_remove(struct platform_device *pdev)
143138
{
144139
component_del(&pdev->dev, &mtk_disp_aal_component_ops);
145-
146-
return 0;
147140
}
148141

149142
static const struct mtk_disp_aal_data mt8173_aal_driver_data = {
@@ -160,7 +153,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_aal_driver_dt_match);
160153

161154
struct platform_driver mtk_disp_aal_driver = {
162155
.probe = mtk_disp_aal_probe,
163-
.remove = mtk_disp_aal_remove,
156+
.remove_new = mtk_disp_aal_remove,
164157
.driver = {
165158
.name = "mediatek-disp-aal",
166159
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_ccorr.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ struct mtk_disp_ccorr_data {
3333
u32 matrix_bits;
3434
};
3535

36-
/**
37-
* struct mtk_disp_ccorr - DISP_CCORR driver structure
38-
* @ddp_comp - structure containing type enum and hardware resources
39-
* @crtc - associated crtc to report irq events to
40-
*/
4136
struct mtk_disp_ccorr {
4237
struct clk *clk;
4338
void __iomem *regs;
@@ -194,11 +189,9 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev)
194189
return ret;
195190
}
196191

197-
static int mtk_disp_ccorr_remove(struct platform_device *pdev)
192+
static void mtk_disp_ccorr_remove(struct platform_device *pdev)
198193
{
199194
component_del(&pdev->dev, &mtk_disp_ccorr_component_ops);
200-
201-
return 0;
202195
}
203196

204197
static const struct mtk_disp_ccorr_data mt8183_ccorr_driver_data = {
@@ -220,7 +213,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_ccorr_driver_dt_match);
220213

221214
struct platform_driver mtk_disp_ccorr_driver = {
222215
.probe = mtk_disp_ccorr_probe,
223-
.remove = mtk_disp_ccorr_remove,
216+
.remove_new = mtk_disp_ccorr_remove,
224217
.driver = {
225218
.name = "mediatek-disp-ccorr",
226219
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_color.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,9 @@ static int mtk_disp_color_probe(struct platform_device *pdev)
131131
return ret;
132132
}
133133

134-
static int mtk_disp_color_remove(struct platform_device *pdev)
134+
static void mtk_disp_color_remove(struct platform_device *pdev)
135135
{
136136
component_del(&pdev->dev, &mtk_disp_color_component_ops);
137-
138-
return 0;
139137
}
140138

141139
static const struct mtk_disp_color_data mt2701_color_driver_data = {
@@ -163,7 +161,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_color_driver_dt_match);
163161

164162
struct platform_driver mtk_disp_color_driver = {
165163
.probe = mtk_disp_color_probe,
166-
.remove = mtk_disp_color_remove,
164+
.remove_new = mtk_disp_color_remove,
167165
.driver = {
168166
.name = "mediatek-disp-color",
169167
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_gamma.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,9 @@ static int mtk_disp_gamma_probe(struct platform_device *pdev)
182182
return ret;
183183
}
184184

185-
static int mtk_disp_gamma_remove(struct platform_device *pdev)
185+
static void mtk_disp_gamma_remove(struct platform_device *pdev)
186186
{
187187
component_del(&pdev->dev, &mtk_disp_gamma_component_ops);
188-
189-
return 0;
190188
}
191189

192190
static const struct mtk_disp_gamma_data mt8173_gamma_driver_data = {
@@ -208,7 +206,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_gamma_driver_dt_match);
208206

209207
struct platform_driver mtk_disp_gamma_driver = {
210208
.probe = mtk_disp_gamma_probe,
211-
.remove = mtk_disp_gamma_remove,
209+
.remove_new = mtk_disp_gamma_remove,
212210
.driver = {
213211
.name = "mediatek-disp-gamma",
214212
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_merge.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,9 @@ static int mtk_disp_merge_probe(struct platform_device *pdev)
294294
return ret;
295295
}
296296

297-
static int mtk_disp_merge_remove(struct platform_device *pdev)
297+
static void mtk_disp_merge_remove(struct platform_device *pdev)
298298
{
299299
component_del(&pdev->dev, &mtk_disp_merge_component_ops);
300-
301-
return 0;
302300
}
303301

304302
static const struct of_device_id mtk_disp_merge_driver_dt_match[] = {
@@ -310,7 +308,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_merge_driver_dt_match);
310308

311309
struct platform_driver mtk_disp_merge_driver = {
312310
.probe = mtk_disp_merge_probe,
313-
.remove = mtk_disp_merge_remove,
311+
.remove_new = mtk_disp_merge_remove,
314312
.driver = {
315313
.name = "mediatek-disp-merge",
316314
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_ovl.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,10 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev)
561561
return ret;
562562
}
563563

564-
static int mtk_disp_ovl_remove(struct platform_device *pdev)
564+
static void mtk_disp_ovl_remove(struct platform_device *pdev)
565565
{
566566
component_del(&pdev->dev, &mtk_disp_ovl_component_ops);
567567
pm_runtime_disable(&pdev->dev);
568-
569-
return 0;
570568
}
571569

572570
static const struct mtk_disp_ovl_data mt2701_ovl_driver_data = {
@@ -658,7 +656,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_ovl_driver_dt_match);
658656

659657
struct platform_driver mtk_disp_ovl_driver = {
660658
.probe = mtk_disp_ovl_probe,
661-
.remove = mtk_disp_ovl_remove,
659+
.remove_new = mtk_disp_ovl_remove,
662660
.driver = {
663661
.name = "mediatek-disp-ovl",
664662
.owner = THIS_MODULE,

drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static int ovl_adaptor_comp_init(struct device *dev, struct component_match **ma
427427
continue;
428428
}
429429

430-
type = (enum mtk_ovl_adaptor_comp_type)of_id->data;
430+
type = (enum mtk_ovl_adaptor_comp_type)(uintptr_t)of_id->data;
431431
id = ovl_adaptor_comp_get_id(dev, node, type);
432432
if (id < 0) {
433433
dev_warn(dev, "Skipping unknown component %pOF\n",

drivers/gpu/drm/mediatek/mtk_disp_rdma.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,11 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev)
379379
return ret;
380380
}
381381

382-
static int mtk_disp_rdma_remove(struct platform_device *pdev)
382+
static void mtk_disp_rdma_remove(struct platform_device *pdev)
383383
{
384384
component_del(&pdev->dev, &mtk_disp_rdma_component_ops);
385385

386386
pm_runtime_disable(&pdev->dev);
387-
388-
return 0;
389387
}
390388

391389
static const struct mtk_disp_rdma_data mt2701_rdma_driver_data = {
@@ -427,7 +425,7 @@ MODULE_DEVICE_TABLE(of, mtk_disp_rdma_driver_dt_match);
427425

428426
struct platform_driver mtk_disp_rdma_driver = {
429427
.probe = mtk_disp_rdma_probe,
430-
.remove = mtk_disp_rdma_remove,
428+
.remove_new = mtk_disp_rdma_remove,
431429
.driver = {
432430
.name = "mediatek-disp-rdma",
433431
.owner = THIS_MODULE,

0 commit comments

Comments
 (0)