Skip to content

Commit 9f0a864

Browse files
committed
Merge tag 'drm-misc-fixes-2024-06-14' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-fixes for v6.10-rc4: - Kconfig fix for WERROR. - Add panel quirk for Aya Neo KUN - Small bugfixes in komeda, bridge/panel, amdgpu, nouveau. - Remove unused nouveau struct. - Call drm_atomic_helper_shutdown for shmobile and mediatek on shutdown. - Remove DEBUGFS ifdefs from komeda. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/941c0552-3614-4af1-b04a-0a62c99fd7fb@linux.intel.com
2 parents f1909e8 + 14731a6 commit 9f0a864

File tree

14 files changed

+38
-21
lines changed

14 files changed

+38
-21
lines changed

drivers/gpu/drm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ config DRM_PRIVACY_SCREEN
450450
config DRM_WERROR
451451
bool "Compile the drm subsystem with warnings as errors"
452452
depends on DRM && EXPERT
453+
depends on !WERROR
453454
default n
454455
help
455456
A kernel build should not cause any compiler warnings, and this

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
108108

109109
memset(&bp, 0, sizeof(bp));
110110
*obj = NULL;
111+
flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
111112

112113
bp.size = size;
113114
bp.byte_align = alignment;

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
604604
if (!amdgpu_bo_support_uswc(bo->flags))
605605
bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
606606

607-
bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
608-
609607
bo->tbo.bdev = &adev->mman.bdev;
610608
if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA |
611609
AMDGPU_GEM_DOMAIN_GDS))

drivers/gpu/drm/arm/display/komeda/komeda_dev.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
#include <linux/platform_device.h>
1313
#include <linux/pm_runtime.h>
1414
#include <linux/dma-mapping.h>
15-
#ifdef CONFIG_DEBUG_FS
1615
#include <linux/debugfs.h>
1716
#include <linux/seq_file.h>
18-
#endif
1917

2018
#include <drm/drm_print.h>
2119

@@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x)
4341

4442
DEFINE_SHOW_ATTRIBUTE(komeda_register);
4543

46-
#ifdef CONFIG_DEBUG_FS
4744
static void komeda_debugfs_init(struct komeda_dev *mdev)
4845
{
4946
if (!debugfs_initialized())
@@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
5552
debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root,
5653
&mdev->err_verbosity);
5754
}
58-
#endif
5955

6056
static ssize_t
6157
core_id_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -265,9 +261,7 @@ struct komeda_dev *komeda_dev_create(struct device *dev)
265261

266262
mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS;
267263

268-
#ifdef CONFIG_DEBUG_FS
269264
komeda_debugfs_init(mdev);
270-
#endif
271265

272266
return mdev;
273267

@@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev)
286280

287281
sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group);
288282

289-
#ifdef CONFIG_DEBUG_FS
290283
debugfs_remove_recursive(mdev->debugfs_root);
291-
#endif
292284

293285
if (mdev->aclk)
294286
clk_prepare_enable(mdev->aclk);

drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ komeda_component_get_avail_scaler(struct komeda_component *c,
259259
u32 avail_scalers;
260260

261261
pipe_st = komeda_pipeline_get_state(c->pipeline, state);
262-
if (!pipe_st)
262+
if (IS_ERR_OR_NULL(pipe_st))
263263
return NULL;
264264

265265
avail_scalers = (pipe_st->active_comps & KOMEDA_PIPELINE_SCALERS) ^

drivers/gpu/drm/bridge/panel.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,12 @@ EXPORT_SYMBOL(drm_panel_bridge_set_orientation);
360360

361361
static void devm_drm_panel_bridge_release(struct device *dev, void *res)
362362
{
363-
struct drm_bridge **bridge = res;
363+
struct drm_bridge *bridge = *(struct drm_bridge **)res;
364364

365-
drm_panel_bridge_remove(*bridge);
365+
if (!bridge)
366+
return;
367+
368+
drm_bridge_remove(bridge);
366369
}
367370

368371
/**

drivers/gpu/drm/drm_panel_orientation_quirks.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ static const struct dmi_system_id orientation_data[] = {
202202
DMI_MATCH(DMI_BOARD_NAME, "NEXT"),
203203
},
204204
.driver_data = (void *)&lcd800x1280_rightside_up,
205+
}, { /* AYA NEO KUN */
206+
.matches = {
207+
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
208+
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
209+
},
210+
.driver_data = (void *)&lcd1600x2560_rightside_up,
205211
}, { /* Chuwi HiBook (CWI514) */
206212
.matches = {
207213
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),

drivers/gpu/drm/mediatek/mtk_drm_drv.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,13 @@ static void mtk_drm_remove(struct platform_device *pdev)
952952
of_node_put(private->comp_node[i]);
953953
}
954954

955+
static void mtk_drm_shutdown(struct platform_device *pdev)
956+
{
957+
struct mtk_drm_private *private = platform_get_drvdata(pdev);
958+
959+
drm_atomic_helper_shutdown(private->drm);
960+
}
961+
955962
static int mtk_drm_sys_prepare(struct device *dev)
956963
{
957964
struct mtk_drm_private *private = dev_get_drvdata(dev);
@@ -983,6 +990,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = {
983990
static struct platform_driver mtk_drm_platform_driver = {
984991
.probe = mtk_drm_probe,
985992
.remove_new = mtk_drm_remove,
993+
.shutdown = mtk_drm_shutdown,
986994
.driver = {
987995
.name = "mediatek-drm",
988996
.pm = &mtk_drm_pm_ops,

drivers/gpu/drm/nouveau/dispnv04/disp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ nv04_display_fini(struct drm_device *dev, bool runtime, bool suspend)
6868
if (nv_two_heads(dev))
6969
NVWriteCRTC(dev, 1, NV_PCRTC_INTR_EN_0, 0);
7070

71-
if (!runtime)
71+
if (!runtime && !drm->headless)
7272
cancel_work_sync(&drm->hpd_work);
7373

7474
if (!suspend)

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,7 @@ nv50_display_fini(struct drm_device *dev, bool runtime, bool suspend)
26802680
nv50_mstm_fini(nouveau_encoder(encoder));
26812681
}
26822682

2683-
if (!runtime)
2683+
if (!runtime && !drm->headless)
26842684
cancel_work_sync(&drm->hpd_work);
26852685
}
26862686

0 commit comments

Comments
 (0)