Skip to content

Commit 5292070

Browse files
committed
Merge tag 'drm-misc-next-2023-07-27' of git://anongit.freedesktop.org/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
2 parents 5c1b19b + 7c5aa94 commit 5292070

File tree

156 files changed

+628
-695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+628
-695
lines changed

arch/sh/boards/mach-sh7763rdp/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static struct fb_videomode sh7763fb_videomode = {
119119
.vsync_len = 1,
120120
.sync = 0,
121121
.vmode = FB_VMODE_NONINTERLACED,
122-
.flag = FBINFO_FLAG_DEFAULT,
122+
.flag = FB_MODE_IS_UNKNOWN,
123123
};
124124

125125
static struct sh7760fb_platdata sh7763fb_def_pdata = {

arch/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ drivers-$(CONFIG_PCI) += arch/x86/pci/
259259
# suspend and hibernation support
260260
drivers-$(CONFIG_PM) += arch/x86/power/
261261

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

264264
####
265265
# boot loader support. Several targets are kept for legacy purposes

arch/x86/video/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
obj-$(CONFIG_FB) += fbdev.o
2+
obj-$(CONFIG_FB_CORE) += fbdev.o

drivers/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig"
129129

130130
source "drivers/dca/Kconfig"
131131

132-
source "drivers/auxdisplay/Kconfig"
133-
134132
source "drivers/uio/Kconfig"
135133

136134
source "drivers/vfio/Kconfig"

drivers/auxdisplay/cfag12864bfb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device)
7979
info->var = cfag12864bfb_var;
8080
info->pseudo_palette = NULL;
8181
info->par = NULL;
82-
info->flags = FBINFO_FLAG_DEFAULT;
8382

8483
if (register_framebuffer(info) < 0)
8584
goto fballoced;

drivers/auxdisplay/ht16k33.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
646646
fbdev->info->var = ht16k33_fb_var;
647647
fbdev->info->bl_dev = bl;
648648
fbdev->info->pseudo_palette = NULL;
649-
fbdev->info->flags = FBINFO_FLAG_DEFAULT;
650649
fbdev->info->par = priv;
651650

652651
err = register_framebuffer(fbdev->info);

drivers/dma-buf/dma-buf-sysfs-stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* into their address space. This necessitated the creation of the DMA-BUF sysfs
3434
* statistics interface to provide per-buffer information on production systems.
3535
*
36-
* The interface at ``/sys/kernel/dma-buf/buffers`` exposes information about
36+
* The interface at ``/sys/kernel/dmabuf/buffers`` exposes information about
3737
* every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled.
3838
*
3939
* The following stats are exposed by the interface:

drivers/gpu/drm/Kconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ menuconfig DRM
99
tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
1010
depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
1111
select DRM_PANEL_ORIENTATION_QUIRKS
12+
select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
13+
select FB_CORE if DRM_FBDEV_EMULATION
14+
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
1215
select HDMI
1316
select I2C
1417
select DMA_SHARED_BUFFER
@@ -96,7 +99,6 @@ config DRM_KUNIT_TEST
9699
config DRM_KMS_HELPER
97100
tristate
98101
depends on DRM
99-
select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
100102
help
101103
CRTC helpers for KMS drivers.
102104

@@ -132,8 +134,7 @@ config DRM_DEBUG_MODESET_LOCK
132134

133135
config DRM_FBDEV_EMULATION
134136
bool "Enable legacy fbdev support for your modesetting driver"
135-
depends on DRM_KMS_HELPER
136-
depends on FB=y || FB=DRM_KMS_HELPER
137+
depends on DRM
137138
select FRAMEBUFFER_CONSOLE if !EXPERT
138139
select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
139140
default y
@@ -223,7 +224,7 @@ config DRM_TTM_HELPER
223224
config DRM_GEM_DMA_HELPER
224225
tristate
225226
depends on DRM
226-
select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
227+
select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
227228
help
228229
Choose this if you need the GEM DMA helper functions
229230

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <drm/drm_atomic_helper.h>
1313
#include <drm/drm_print.h>
1414
#include <drm/drm_vblank.h>
15+
#include <drm/drm_simple_kms_helper.h>
16+
#include <drm/drm_bridge.h>
1517

1618
#include "komeda_dev.h"
1719
#include "komeda_kms.h"
@@ -612,9 +614,11 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
612614
struct komeda_crtc *kcrtc)
613615
{
614616
struct drm_crtc *crtc = &kcrtc->base;
617+
struct drm_device *base = &kms->base;
618+
struct drm_bridge *bridge;
615619
int err;
616620

617-
err = drm_crtc_init_with_planes(&kms->base, crtc,
621+
err = drm_crtc_init_with_planes(base, crtc,
618622
get_crtc_primary(kms, kcrtc), NULL,
619623
&komeda_crtc_funcs, NULL);
620624
if (err)
@@ -624,6 +628,22 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
624628

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

631+
/* Construct an encoder for each pipeline and attach it to the remote
632+
* bridge
633+
*/
634+
kcrtc->encoder.possible_crtcs = drm_crtc_mask(crtc);
635+
err = drm_simple_encoder_init(base, &kcrtc->encoder,
636+
DRM_MODE_ENCODER_TMDS);
637+
if (err)
638+
return err;
639+
640+
bridge = devm_drm_of_get_bridge(base->dev, kcrtc->master->of_node,
641+
KOMEDA_OF_PORT_OUTPUT, 0);
642+
if (IS_ERR(bridge))
643+
return PTR_ERR(bridge);
644+
645+
err = drm_bridge_attach(&kcrtc->encoder, bridge, NULL, 0);
646+
627647
drm_crtc_enable_color_mgmt(crtc, 0, true, KOMEDA_COLOR_LUT_SIZE);
628648

629649
return err;

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

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <linux/kernel.h>
99
#include <linux/of.h>
1010
#include <linux/platform_device.h>
11-
#include <linux/component.h>
1211
#include <linux/pm_runtime.h>
1312
#include <drm/drm_fbdev_generic.h>
1413
#include <drm/drm_module.h>
@@ -28,13 +27,11 @@ struct komeda_dev *dev_to_mdev(struct device *dev)
2827
return mdrv ? mdrv->mdev : NULL;
2928
}
3029

31-
static void komeda_unbind(struct device *dev)
30+
static void komeda_platform_remove(struct platform_device *pdev)
3231
{
32+
struct device *dev = &pdev->dev;
3333
struct komeda_drv *mdrv = dev_get_drvdata(dev);
3434

35-
if (!mdrv)
36-
return;
37-
3835
komeda_kms_detach(mdrv->kms);
3936

4037
if (pm_runtime_enabled(dev))
@@ -48,8 +45,9 @@ static void komeda_unbind(struct device *dev)
4845
devm_kfree(dev, mdrv);
4946
}
5047

51-
static int komeda_bind(struct device *dev)
48+
static int komeda_platform_probe(struct platform_device *pdev)
5249
{
50+
struct device *dev = &pdev->dev;
5351
struct komeda_drv *mdrv;
5452
int err;
5553

@@ -91,51 +89,6 @@ static int komeda_bind(struct device *dev)
9189
return err;
9290
}
9391

94-
static const struct component_master_ops komeda_master_ops = {
95-
.bind = komeda_bind,
96-
.unbind = komeda_unbind,
97-
};
98-
99-
static void komeda_add_slave(struct device *master,
100-
struct component_match **match,
101-
struct device_node *np,
102-
u32 port, u32 endpoint)
103-
{
104-
struct device_node *remote;
105-
106-
remote = of_graph_get_remote_node(np, port, endpoint);
107-
if (remote) {
108-
drm_of_component_match_add(master, match, component_compare_of, remote);
109-
of_node_put(remote);
110-
}
111-
}
112-
113-
static int komeda_platform_probe(struct platform_device *pdev)
114-
{
115-
struct device *dev = &pdev->dev;
116-
struct component_match *match = NULL;
117-
struct device_node *child;
118-
119-
if (!dev->of_node)
120-
return -ENODEV;
121-
122-
for_each_available_child_of_node(dev->of_node, child) {
123-
if (of_node_cmp(child->name, "pipeline") != 0)
124-
continue;
125-
126-
/* add connector */
127-
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 0);
128-
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 1);
129-
}
130-
131-
return component_master_add_with_match(dev, &komeda_master_ops, match);
132-
}
133-
134-
static void komeda_platform_remove(struct platform_device *pdev)
135-
{
136-
component_master_del(&pdev->dev, &komeda_master_ops);
137-
}
138-
13992
static const struct of_device_id komeda_of_match[] = {
14093
{ .compatible = "arm,mali-d71", .data = d71_identify, },
14194
{ .compatible = "arm,mali-d32", .data = d71_identify, },

0 commit comments

Comments
 (0)