Skip to content

Commit

Permalink
Merge tag 'drm-misc-next-2023-07-27' of git://anongit.freedesktop.org…
Browse files Browse the repository at this point in the history
…/drm/drm-misc into drm-next

drm-misc-next for v6.6:

UAPI Changes:

Cross-subsystem Changes:

 * dma-buf:
   * Documentation fixes

 * fbdev:
   * Make FB core selectable without drivers
   * Remove obsolete flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT
     from all drivers and <linux/fb.h>
   * Add helper macros and Kconfig tokens for DMA-allocated framebuffers
   * Cleanups

Core Changes:

 * Respect given gfp flags in drmm_kmalloc()

Driver Changes:

 * ast:
   * Cleanups

 * bridge:
   * anx7625: Locking fixes
 * tc358767: Fix hardware delays
   * Minor fixes and cleanups

 * exynos:
   * Use fbdev DMA helpers

 * komeda:
   * Always attach encoder

 * omapdrm:
   * Use fbdev DMA helpers

 * panel:
   * ld9040: Fix Kconfig dependency
   * Minor cleanups

 * ssd130x:
   * Fix allocation of temporary buffers
   * Fix pitch computation

 * tegra:
   * Use fbdev DMA helpers

Signed-off-by: Daniel Vetter <[email protected]>
From: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20230727124444.GA5547@linux-uq9g
  • Loading branch information
danvet committed Jul 27, 2023
2 parents 5c1b19b + 7c5aa94 commit 5292070
Show file tree
Hide file tree
Showing 156 changed files with 628 additions and 695 deletions.
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-sh7763rdp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static struct fb_videomode sh7763fb_videomode = {
.vsync_len = 1,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
.flag = FBINFO_FLAG_DEFAULT,
.flag = FB_MODE_IS_UNKNOWN,
};

static struct sh7760fb_platdata sh7763fb_def_pdata = {
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ drivers-$(CONFIG_PCI) += arch/x86/pci/
# suspend and hibernation support
drivers-$(CONFIG_PM) += arch/x86/power/

drivers-$(CONFIG_FB) += arch/x86/video/
drivers-$(CONFIG_FB_CORE) += arch/x86/video/

####
# boot loader support. Several targets are kept for legacy purposes
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/video/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_FB) += fbdev.o
obj-$(CONFIG_FB_CORE) += fbdev.o
2 changes: 0 additions & 2 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig"

source "drivers/dca/Kconfig"

source "drivers/auxdisplay/Kconfig"

source "drivers/uio/Kconfig"

source "drivers/vfio/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion drivers/auxdisplay/cfag12864bfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device)
info->var = cfag12864bfb_var;
info->pseudo_palette = NULL;
info->par = NULL;
info->flags = FBINFO_FLAG_DEFAULT;

if (register_framebuffer(info) < 0)
goto fballoced;
Expand Down
1 change: 0 additions & 1 deletion drivers/auxdisplay/ht16k33.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
fbdev->info->var = ht16k33_fb_var;
fbdev->info->bl_dev = bl;
fbdev->info->pseudo_palette = NULL;
fbdev->info->flags = FBINFO_FLAG_DEFAULT;
fbdev->info->par = priv;

err = register_framebuffer(fbdev->info);
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma-buf/dma-buf-sysfs-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* into their address space. This necessitated the creation of the DMA-BUF sysfs
* statistics interface to provide per-buffer information on production systems.
*
* The interface at ``/sys/kernel/dma-buf/buffers`` exposes information about
* The interface at ``/sys/kernel/dmabuf/buffers`` exposes information about
* every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled.
*
* The following stats are exposed by the interface:
Expand Down
9 changes: 5 additions & 4 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ menuconfig DRM
tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
select DRM_PANEL_ORIENTATION_QUIRKS
select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
select FB_CORE if DRM_FBDEV_EMULATION
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
select HDMI
select I2C
select DMA_SHARED_BUFFER
Expand Down Expand Up @@ -96,7 +99,6 @@ config DRM_KUNIT_TEST
config DRM_KMS_HELPER
tristate
depends on DRM
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
help
CRTC helpers for KMS drivers.

Expand Down Expand Up @@ -132,8 +134,7 @@ config DRM_DEBUG_MODESET_LOCK

config DRM_FBDEV_EMULATION
bool "Enable legacy fbdev support for your modesetting driver"
depends on DRM_KMS_HELPER
depends on FB=y || FB=DRM_KMS_HELPER
depends on DRM
select FRAMEBUFFER_CONSOLE if !EXPERT
select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
default y
Expand Down Expand Up @@ -223,7 +224,7 @@ config DRM_TTM_HELPER
config DRM_GEM_DMA_HELPER
tristate
depends on DRM
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
help
Choose this if you need the GEM DMA helper functions

Expand Down
22 changes: 21 additions & 1 deletion drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_print.h>
#include <drm/drm_vblank.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_bridge.h>

#include "komeda_dev.h"
#include "komeda_kms.h"
Expand Down Expand Up @@ -612,9 +614,11 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
struct komeda_crtc *kcrtc)
{
struct drm_crtc *crtc = &kcrtc->base;
struct drm_device *base = &kms->base;
struct drm_bridge *bridge;
int err;

err = drm_crtc_init_with_planes(&kms->base, crtc,
err = drm_crtc_init_with_planes(base, crtc,
get_crtc_primary(kms, kcrtc), NULL,
&komeda_crtc_funcs, NULL);
if (err)
Expand All @@ -624,6 +628,22 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,

crtc->port = kcrtc->master->of_output_port;

/* Construct an encoder for each pipeline and attach it to the remote
* bridge
*/
kcrtc->encoder.possible_crtcs = drm_crtc_mask(crtc);
err = drm_simple_encoder_init(base, &kcrtc->encoder,
DRM_MODE_ENCODER_TMDS);
if (err)
return err;

bridge = devm_drm_of_get_bridge(base->dev, kcrtc->master->of_node,
KOMEDA_OF_PORT_OUTPUT, 0);
if (IS_ERR(bridge))
return PTR_ERR(bridge);

err = drm_bridge_attach(&kcrtc->encoder, bridge, NULL, 0);

drm_crtc_enable_color_mgmt(crtc, 0, true, KOMEDA_COLOR_LUT_SIZE);

return err;
Expand Down
55 changes: 4 additions & 51 deletions drivers/gpu/drm/arm/display/komeda/komeda_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/component.h>
#include <linux/pm_runtime.h>
#include <drm/drm_fbdev_generic.h>
#include <drm/drm_module.h>
Expand All @@ -28,13 +27,11 @@ struct komeda_dev *dev_to_mdev(struct device *dev)
return mdrv ? mdrv->mdev : NULL;
}

static void komeda_unbind(struct device *dev)
static void komeda_platform_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct komeda_drv *mdrv = dev_get_drvdata(dev);

if (!mdrv)
return;

komeda_kms_detach(mdrv->kms);

if (pm_runtime_enabled(dev))
Expand All @@ -48,8 +45,9 @@ static void komeda_unbind(struct device *dev)
devm_kfree(dev, mdrv);
}

static int komeda_bind(struct device *dev)
static int komeda_platform_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct komeda_drv *mdrv;
int err;

Expand Down Expand Up @@ -91,51 +89,6 @@ static int komeda_bind(struct device *dev)
return err;
}

static const struct component_master_ops komeda_master_ops = {
.bind = komeda_bind,
.unbind = komeda_unbind,
};

static void komeda_add_slave(struct device *master,
struct component_match **match,
struct device_node *np,
u32 port, u32 endpoint)
{
struct device_node *remote;

remote = of_graph_get_remote_node(np, port, endpoint);
if (remote) {
drm_of_component_match_add(master, match, component_compare_of, remote);
of_node_put(remote);
}
}

static int komeda_platform_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct component_match *match = NULL;
struct device_node *child;

if (!dev->of_node)
return -ENODEV;

for_each_available_child_of_node(dev->of_node, child) {
if (of_node_cmp(child->name, "pipeline") != 0)
continue;

/* add connector */
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 0);
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 1);
}

return component_master_add_with_match(dev, &komeda_master_ops, match);
}

static void komeda_platform_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &komeda_master_ops);
}

static const struct of_device_id komeda_of_match[] = {
{ .compatible = "arm,mali-d71", .data = d71_identify, },
{ .compatible = "arm,mali-d32", .data = d71_identify, },
Expand Down
11 changes: 1 addition & 10 deletions drivers/gpu/drm/arm/display/komeda/komeda_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Author: James.Qian.Wang <[email protected]>
*
*/
#include <linux/component.h>
#include <linux/interrupt.h>

#include <drm/drm_atomic.h>
Expand Down Expand Up @@ -305,17 +304,13 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
if (err)
goto cleanup_mode_config;

err = component_bind_all(mdev->dev, kms);
if (err)
goto cleanup_mode_config;

drm_mode_config_reset(drm);

err = devm_request_irq(drm->dev, mdev->irq,
komeda_kms_irq_handler, IRQF_SHARED,
drm->driver->name, drm);
if (err)
goto free_component_binding;
goto cleanup_mode_config;

drm_kms_helper_poll_init(drm);

Expand All @@ -327,8 +322,6 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)

free_interrupts:
drm_kms_helper_poll_fini(drm);
free_component_binding:
component_unbind_all(mdev->dev, drm);
cleanup_mode_config:
drm_mode_config_cleanup(drm);
komeda_kms_cleanup_private_objs(kms);
Expand All @@ -339,12 +332,10 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev)
void komeda_kms_detach(struct komeda_kms_dev *kms)
{
struct drm_device *drm = &kms->base;
struct komeda_dev *mdev = drm->dev_private;

drm_dev_unregister(drm);
drm_kms_helper_poll_fini(drm);
drm_atomic_helper_shutdown(drm);
component_unbind_all(mdev->dev, drm);
drm_mode_config_cleanup(drm);
komeda_kms_cleanup_private_objs(kms);
drm->dev_private = NULL;
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/arm/display/komeda/komeda_kms.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ struct komeda_crtc {

/** @disable_done: this flip_done is for tracing the disable */
struct completion *disable_done;

/** @encoder: encoder at the end of the pipeline */
struct drm_encoder encoder;
};

/**
Expand Down
21 changes: 0 additions & 21 deletions drivers/gpu/drm/ast/ast_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@

#include "ast_drv.h"

static int ast_init_pci_config(struct pci_dev *pdev)
{
int err;
u16 pcis04;

err = pci_read_config_word(pdev, PCI_COMMAND, &pcis04);
if (err)
goto out;

pcis04 |= PCI_COMMAND_MEMORY | PCI_COMMAND_IO;

err = pci_write_config_word(pdev, PCI_COMMAND, pcis04);

out:
return pcibios_err_to_errno(err);
}

static bool ast_is_vga_enabled(struct drm_device *dev)
{
struct ast_device *ast = to_ast_device(dev);
Expand Down Expand Up @@ -483,10 +466,6 @@ struct ast_device *ast_device_create(const struct drm_driver *drv,
return ERR_PTR(-EIO);
}

ret = ast_init_pci_config(pdev);
if (ret)
return ERR_PTR(ret);

if (!ast_is_vga_enabled(dev)) {
drm_info(dev, "VGA not enabled on entry, requesting chip POST\n");
need_post = true;
Expand Down
20 changes: 10 additions & 10 deletions drivers/gpu/drm/bridge/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ config DRM_FSL_LDB
Support for i.MX8MP DPI-to-LVDS on-SoC encoder.

config DRM_ITE_IT6505
tristate "ITE IT6505 DisplayPort bridge"
depends on OF
tristate "ITE IT6505 DisplayPort bridge"
depends on OF
select DRM_DISPLAY_DP_HELPER
select DRM_DISPLAY_HDCP_HELPER
select DRM_DISPLAY_HELPER
select DRM_DP_AUX_BUS
select DRM_KMS_HELPER
select DRM_DP_HELPER
select EXTCON
select CRYPTO
select CRYPTO_HASH
help
ITE IT6505 DisplayPort bridge chip driver.
select DRM_DP_AUX_BUS
select DRM_KMS_HELPER
select DRM_DP_HELPER
select EXTCON
select CRYPTO
select CRYPTO_HASH
help
ITE IT6505 DisplayPort bridge chip driver.

config DRM_LONTIUM_LT8912B
tristate "Lontium LT8912B DSI/HDMI bridge"
Expand Down
Loading

0 comments on commit 5292070

Please sign in to comment.