Commit 9f0a8649 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2024-06-14' of...

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: default avatarDave 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
parents f1909e85 14731a64
...@@ -450,6 +450,7 @@ config DRM_PRIVACY_SCREEN ...@@ -450,6 +450,7 @@ config DRM_PRIVACY_SCREEN
config DRM_WERROR config DRM_WERROR
bool "Compile the drm subsystem with warnings as errors" bool "Compile the drm subsystem with warnings as errors"
depends on DRM && EXPERT depends on DRM && EXPERT
depends on !WERROR
default n default n
help help
A kernel build should not cause any compiler warnings, and this A kernel build should not cause any compiler warnings, and this
......
...@@ -108,6 +108,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, ...@@ -108,6 +108,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
memset(&bp, 0, sizeof(bp)); memset(&bp, 0, sizeof(bp));
*obj = NULL; *obj = NULL;
flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
bp.size = size; bp.size = size;
bp.byte_align = alignment; bp.byte_align = alignment;
......
...@@ -604,8 +604,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev, ...@@ -604,8 +604,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
if (!amdgpu_bo_support_uswc(bo->flags)) if (!amdgpu_bo_support_uswc(bo->flags))
bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC; bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
bo->tbo.bdev = &adev->mman.bdev; bo->tbo.bdev = &adev->mman.bdev;
if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA | if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA |
AMDGPU_GEM_DOMAIN_GDS)) AMDGPU_GEM_DOMAIN_GDS))
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#endif
#include <drm/drm_print.h> #include <drm/drm_print.h>
...@@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x) ...@@ -43,7 +41,6 @@ static int komeda_register_show(struct seq_file *sf, void *x)
DEFINE_SHOW_ATTRIBUTE(komeda_register); DEFINE_SHOW_ATTRIBUTE(komeda_register);
#ifdef CONFIG_DEBUG_FS
static void komeda_debugfs_init(struct komeda_dev *mdev) static void komeda_debugfs_init(struct komeda_dev *mdev)
{ {
if (!debugfs_initialized()) if (!debugfs_initialized())
...@@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev) ...@@ -55,7 +52,6 @@ static void komeda_debugfs_init(struct komeda_dev *mdev)
debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root, debugfs_create_x16("err_verbosity", 0664, mdev->debugfs_root,
&mdev->err_verbosity); &mdev->err_verbosity);
} }
#endif
static ssize_t static ssize_t
core_id_show(struct device *dev, struct device_attribute *attr, char *buf) 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) ...@@ -265,9 +261,7 @@ struct komeda_dev *komeda_dev_create(struct device *dev)
mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS; mdev->err_verbosity = KOMEDA_DEV_PRINT_ERR_EVENTS;
#ifdef CONFIG_DEBUG_FS
komeda_debugfs_init(mdev); komeda_debugfs_init(mdev);
#endif
return mdev; return mdev;
...@@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev) ...@@ -286,9 +280,7 @@ void komeda_dev_destroy(struct komeda_dev *mdev)
sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group); sysfs_remove_group(&dev->kobj, &komeda_sysfs_attr_group);
#ifdef CONFIG_DEBUG_FS
debugfs_remove_recursive(mdev->debugfs_root); debugfs_remove_recursive(mdev->debugfs_root);
#endif
if (mdev->aclk) if (mdev->aclk)
clk_prepare_enable(mdev->aclk); clk_prepare_enable(mdev->aclk);
......
...@@ -259,7 +259,7 @@ komeda_component_get_avail_scaler(struct komeda_component *c, ...@@ -259,7 +259,7 @@ komeda_component_get_avail_scaler(struct komeda_component *c,
u32 avail_scalers; u32 avail_scalers;
pipe_st = komeda_pipeline_get_state(c->pipeline, state); pipe_st = komeda_pipeline_get_state(c->pipeline, state);
if (!pipe_st) if (IS_ERR_OR_NULL(pipe_st))
return NULL; return NULL;
avail_scalers = (pipe_st->active_comps & KOMEDA_PIPELINE_SCALERS) ^ avail_scalers = (pipe_st->active_comps & KOMEDA_PIPELINE_SCALERS) ^
......
...@@ -360,9 +360,12 @@ EXPORT_SYMBOL(drm_panel_bridge_set_orientation); ...@@ -360,9 +360,12 @@ EXPORT_SYMBOL(drm_panel_bridge_set_orientation);
static void devm_drm_panel_bridge_release(struct device *dev, void *res) static void devm_drm_panel_bridge_release(struct device *dev, void *res)
{ {
struct drm_bridge **bridge = res; struct drm_bridge *bridge = *(struct drm_bridge **)res;
drm_panel_bridge_remove(*bridge); if (!bridge)
return;
drm_bridge_remove(bridge);
} }
/** /**
......
...@@ -202,6 +202,12 @@ static const struct dmi_system_id orientation_data[] = { ...@@ -202,6 +202,12 @@ static const struct dmi_system_id orientation_data[] = {
DMI_MATCH(DMI_BOARD_NAME, "NEXT"), DMI_MATCH(DMI_BOARD_NAME, "NEXT"),
}, },
.driver_data = (void *)&lcd800x1280_rightside_up, .driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* AYA NEO KUN */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
},
.driver_data = (void *)&lcd1600x2560_rightside_up,
}, { /* Chuwi HiBook (CWI514) */ }, { /* Chuwi HiBook (CWI514) */
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
......
...@@ -952,6 +952,13 @@ static void mtk_drm_remove(struct platform_device *pdev) ...@@ -952,6 +952,13 @@ static void mtk_drm_remove(struct platform_device *pdev)
of_node_put(private->comp_node[i]); of_node_put(private->comp_node[i]);
} }
static void mtk_drm_shutdown(struct platform_device *pdev)
{
struct mtk_drm_private *private = platform_get_drvdata(pdev);
drm_atomic_helper_shutdown(private->drm);
}
static int mtk_drm_sys_prepare(struct device *dev) static int mtk_drm_sys_prepare(struct device *dev)
{ {
struct mtk_drm_private *private = dev_get_drvdata(dev); struct mtk_drm_private *private = dev_get_drvdata(dev);
...@@ -983,6 +990,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = { ...@@ -983,6 +990,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = {
static struct platform_driver mtk_drm_platform_driver = { static struct platform_driver mtk_drm_platform_driver = {
.probe = mtk_drm_probe, .probe = mtk_drm_probe,
.remove_new = mtk_drm_remove, .remove_new = mtk_drm_remove,
.shutdown = mtk_drm_shutdown,
.driver = { .driver = {
.name = "mediatek-drm", .name = "mediatek-drm",
.pm = &mtk_drm_pm_ops, .pm = &mtk_drm_pm_ops,
......
...@@ -68,7 +68,7 @@ nv04_display_fini(struct drm_device *dev, bool runtime, bool suspend) ...@@ -68,7 +68,7 @@ nv04_display_fini(struct drm_device *dev, bool runtime, bool suspend)
if (nv_two_heads(dev)) if (nv_two_heads(dev))
NVWriteCRTC(dev, 1, NV_PCRTC_INTR_EN_0, 0); NVWriteCRTC(dev, 1, NV_PCRTC_INTR_EN_0, 0);
if (!runtime) if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work); cancel_work_sync(&drm->hpd_work);
if (!suspend) if (!suspend)
......
...@@ -2680,7 +2680,7 @@ nv50_display_fini(struct drm_device *dev, bool runtime, bool suspend) ...@@ -2680,7 +2680,7 @@ nv50_display_fini(struct drm_device *dev, bool runtime, bool suspend)
nv50_mstm_fini(nouveau_encoder(encoder)); nv50_mstm_fini(nouveau_encoder(encoder));
} }
if (!runtime) if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work); cancel_work_sync(&drm->hpd_work);
} }
......
...@@ -43,11 +43,6 @@ ...@@ -43,11 +43,6 @@
#define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg) #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg)
#define LOG_OLD_VALUE(x) #define LOG_OLD_VALUE(x)
struct init_exec {
bool execute;
bool repeat;
};
static bool nv_cksum(const uint8_t *data, unsigned int length) static bool nv_cksum(const uint8_t *data, unsigned int length)
{ {
/* /*
......
...@@ -450,6 +450,9 @@ nouveau_display_hpd_resume(struct drm_device *dev) ...@@ -450,6 +450,9 @@ nouveau_display_hpd_resume(struct drm_device *dev)
{ {
struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_drm *drm = nouveau_drm(dev);
if (drm->headless)
return;
spin_lock_irq(&drm->hpd_lock); spin_lock_irq(&drm->hpd_lock);
drm->hpd_pending = ~0; drm->hpd_pending = ~0;
spin_unlock_irq(&drm->hpd_lock); spin_unlock_irq(&drm->hpd_lock);
...@@ -635,7 +638,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime) ...@@ -635,7 +638,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
} }
drm_connector_list_iter_end(&conn_iter); drm_connector_list_iter_end(&conn_iter);
if (!runtime) if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work); cancel_work_sync(&drm->hpd_work);
drm_kms_helper_poll_disable(dev); drm_kms_helper_poll_disable(dev);
...@@ -729,6 +732,7 @@ nouveau_display_create(struct drm_device *dev) ...@@ -729,6 +732,7 @@ nouveau_display_create(struct drm_device *dev)
/* no display hw */ /* no display hw */
if (ret == -ENODEV) { if (ret == -ENODEV) {
ret = 0; ret = 0;
drm->headless = true;
goto disp_create_err; goto disp_create_err;
} }
......
...@@ -276,6 +276,7 @@ struct nouveau_drm { ...@@ -276,6 +276,7 @@ struct nouveau_drm {
/* modesetting */ /* modesetting */
struct nvbios vbios; struct nvbios vbios;
struct nouveau_display *display; struct nouveau_display *display;
bool headless;
struct work_struct hpd_work; struct work_struct hpd_work;
spinlock_t hpd_lock; spinlock_t hpd_lock;
u32 hpd_pending; u32 hpd_pending;
......
...@@ -171,6 +171,13 @@ static void shmob_drm_remove(struct platform_device *pdev) ...@@ -171,6 +171,13 @@ static void shmob_drm_remove(struct platform_device *pdev)
drm_kms_helper_poll_fini(ddev); drm_kms_helper_poll_fini(ddev);
} }
static void shmob_drm_shutdown(struct platform_device *pdev)
{
struct shmob_drm_device *sdev = platform_get_drvdata(pdev);
drm_atomic_helper_shutdown(&sdev->ddev);
}
static int shmob_drm_probe(struct platform_device *pdev) static int shmob_drm_probe(struct platform_device *pdev)
{ {
struct shmob_drm_platform_data *pdata = pdev->dev.platform_data; struct shmob_drm_platform_data *pdata = pdev->dev.platform_data;
...@@ -273,6 +280,7 @@ static const struct of_device_id shmob_drm_of_table[] __maybe_unused = { ...@@ -273,6 +280,7 @@ static const struct of_device_id shmob_drm_of_table[] __maybe_unused = {
static struct platform_driver shmob_drm_platform_driver = { static struct platform_driver shmob_drm_platform_driver = {
.probe = shmob_drm_probe, .probe = shmob_drm_probe,
.remove_new = shmob_drm_remove, .remove_new = shmob_drm_remove,
.shutdown = shmob_drm_shutdown,
.driver = { .driver = {
.name = "shmob-drm", .name = "shmob-drm",
.of_match_table = of_match_ptr(shmob_drm_of_table), .of_match_table = of_match_ptr(shmob_drm_of_table),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment