Skip to content

Commit 4302423

Browse files
committed
Merge tag 'drm-misc-next-2022-11-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: - fbdev: Add support for the nomodeset kernel parameter Core Changes: - client: Add kunit tests for drm_connector_pick_cmdline_mode() - dma-buf: Move dma_buf_mmap_internal() to new locking specification - edid: Dump EDID on drm_edid_get_panel_id() failure, Stop using a temporary device to load the EDID through the firmware mechanism - fb-helper: Remove damage worker - gem-vram: Fix deadlock in drm_gem_vram_vmap() - modes: Named mode parsing improvements - tests: Add Kunit helpers to create a DRM device Driver Changes: - hisilicon: convert to drm_mode_init() - malidp: Use drm-managed resources - msm: convert to drm_mode_init() and drm_mode_copy() - mtk: convert to drm_mode_init() - nouveau: Support backlight control for nva3 - rockchip: convert to drm_mode_copy() - sti: convert to drm_mode_copy() - v3d: Switch to drm-managed resources - vc4: Fix potential NULL pointer dereference - panels: - New panel: NewVision NV3051D Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20221117083628.mzij5nrbdzokek7c@houat
2 parents 4e291f2 + 35c3a2d commit 4302423

File tree

108 files changed

+1331
-191
lines changed

Some content is hidden

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

108 files changed

+1331
-191
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3777,12 +3777,15 @@
37773777
shutdown the other cpus. Instead use the REBOOT_VECTOR
37783778
irq.
37793779

3780-
nomodeset Disable kernel modesetting. DRM drivers will not perform
3781-
display-mode changes or accelerated rendering. Only the
3782-
system framebuffer will be available for use if this was
3783-
set-up by the firmware or boot loader.
3784-
3785-
Useful as fallback, or for testing and debugging.
3780+
nomodeset Disable kernel modesetting. Most systems' firmware
3781+
sets up a display mode and provides framebuffer memory
3782+
for output. With nomodeset, DRM and fbdev drivers will
3783+
not load if they could possibly displace the pre-
3784+
initialized output. Only the system framebuffer will
3785+
be available for use. The respective drivers will not
3786+
perform display-mode changes or accelerated rendering.
3787+
3788+
Useful as error fallback, or for testing and debugging.
37863789

37873790
nomodule Disable module load
37883791

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/newvision,nv3051d.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NewVision NV3051D based LCD panel
8+
9+
description: |
10+
The NewVision NV3051D is a driver chip used to drive DSI panels. For now,
11+
this driver only supports the 640x480 panels found in the Anbernic RG353
12+
based devices.
13+
14+
maintainers:
15+
- Chris Morgan <[email protected]>
16+
17+
allOf:
18+
- $ref: panel-common.yaml#
19+
20+
properties:
21+
compatible:
22+
items:
23+
- enum:
24+
- anbernic,rg353p-panel
25+
- anbernic,rg353v-panel
26+
- const: newvision,nv3051d
27+
28+
reg: true
29+
backlight: true
30+
port: true
31+
reset-gpios:
32+
description: Active low reset GPIO
33+
vdd-supply: true
34+
35+
required:
36+
- compatible
37+
- reg
38+
- backlight
39+
40+
additionalProperties: false
41+
42+
examples:
43+
- |
44+
#include <dt-bindings/gpio/gpio.h>
45+
dsi {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
panel@0 {
49+
compatible = "anbernic,rg353p-panel", "newvision,nv3051d";
50+
reg = <0>;
51+
backlight = <&backlight>;
52+
reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;
53+
vdd-supply = <&vcc3v3_lcd>;
54+
55+
port {
56+
mipi_in_panel: endpoint {
57+
remote-endpoint = <&mipi_out_panel>;
58+
};
59+
};
60+
};
61+
};
62+
63+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,8 @@ patternProperties:
887887
description: Shenzhen Netxeon Technology CO., LTD
888888
"^neweast,.*":
889889
description: Guangdong Neweast Optoelectronics CO., LTD
890+
"^newvision,.*":
891+
description: New Vision Display (Shenzhen) Co., Ltd.
890892
"^nexbox,.*":
891893
description: Nexbox
892894
"^nextthing,.*":

Documentation/fb/modedb.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Valid mode specifiers (mode_option argument)::
2626
with <xres>, <yres>, <bpp> and <refresh> decimal numbers and <name> a string.
2727
Things between square brackets are optional.
2828

29+
Valid names are::
30+
31+
- NSTC: 480i output, with the CCIR System-M TV mode and NTSC color encoding
32+
- PAL: 576i output, with the CCIR System-B TV mode and PAL color encoding
33+
2934
If 'M' is specified in the mode_option argument (after <yres> and before
3035
<bpp> and <refresh>, if specified) the timings will be calculated using
3136
VESA(TM) Coordinated Video Timings instead of looking up the mode from a table.

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6701,8 +6701,10 @@ F: drivers/gpu/drm/drm_aperture.c
67016701
F: drivers/gpu/drm/tiny/ofdrm.c
67026702
F: drivers/gpu/drm/tiny/simpledrm.c
67036703
F: drivers/video/aperture.c
6704+
F: drivers/video/nomodeset.c
67046705
F: include/drm/drm_aperture.h
67056706
F: include/linux/aperture.h
6707+
F: include/video/nomodeset.h
67066708

67076709
DRM DRIVER FOR SIS VIDEO CARDS
67086710
S: Orphan / Obsolete

drivers/dma-buf/dma-buf.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static struct file_system_type dma_buf_fs_type = {
129129
static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct *vma)
130130
{
131131
struct dma_buf *dmabuf;
132+
int ret;
132133

133134
if (!is_dma_buf_file(file))
134135
return -EINVAL;
@@ -144,7 +145,11 @@ static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct *vma)
144145
dmabuf->size >> PAGE_SHIFT)
145146
return -EINVAL;
146147

147-
return dmabuf->ops->mmap(dmabuf, vma);
148+
dma_resv_lock(dmabuf->resv, NULL);
149+
ret = dmabuf->ops->mmap(dmabuf, vma);
150+
dma_resv_unlock(dmabuf->resv);
151+
152+
return ret;
148153
}
149154

150155
static loff_t dma_buf_llseek(struct file *file, loff_t offset, int whence)

drivers/dma-buf/heaps/cma_heap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/dma-buf.h>
1414
#include <linux/dma-heap.h>
1515
#include <linux/dma-map-ops.h>
16+
#include <linux/dma-resv.h>
1617
#include <linux/err.h>
1718
#include <linux/highmem.h>
1819
#include <linux/io.h>
@@ -182,6 +183,8 @@ static int cma_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
182183
{
183184
struct cma_heap_buffer *buffer = dmabuf->priv;
184185

186+
dma_resv_assert_held(dmabuf->resv);
187+
185188
if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0)
186189
return -EINVAL;
187190

drivers/dma-buf/heaps/system_heap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/dma-buf.h>
1414
#include <linux/dma-mapping.h>
1515
#include <linux/dma-heap.h>
16+
#include <linux/dma-resv.h>
1617
#include <linux/err.h>
1718
#include <linux/highmem.h>
1819
#include <linux/mm.h>
@@ -201,6 +202,8 @@ static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
201202
struct sg_page_iter piter;
202203
int ret;
203204

205+
dma_resv_assert_held(dmabuf->resv);
206+
204207
for_each_sgtable_page(table, &piter, vma->vm_pgoff) {
205208
struct page *page = sg_page_iter_page(&piter);
206209

drivers/dma-buf/udmabuf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <linux/cred.h>
33
#include <linux/device.h>
44
#include <linux/dma-buf.h>
5+
#include <linux/dma-resv.h>
56
#include <linux/highmem.h>
67
#include <linux/init.h>
78
#include <linux/kernel.h>
@@ -49,6 +50,8 @@ static int mmap_udmabuf(struct dma_buf *buf, struct vm_area_struct *vma)
4950
{
5051
struct udmabuf *ubuf = buf->priv;
5152

53+
dma_resv_assert_held(buf->resv);
54+
5255
if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0)
5356
return -EINVAL;
5457

drivers/gpu/drm/Kconfig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
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
11-
select DRM_NOMODESET
1211
select DRM_PANEL_ORIENTATION_QUIRKS
1312
select HDMI
1413
select FB_CMDLINE
@@ -19,6 +18,7 @@ menuconfig DRM
1918
# gallium uses SYS_kcmp for os_same_file_description() to de-duplicate
2019
# device and dmabuf fd. Let's make sure that is available for our userspace.
2120
select KCMP
21+
select VIDEO_NOMODESET
2222
help
2323
Kernel-level support for the Direct Rendering Infrastructure (DRI)
2424
introduced in XFree86 4.0. If you say Y here, you need to select
@@ -514,11 +514,6 @@ config DRM_EXPORT_FOR_TESTS
514514
config DRM_PANEL_ORIENTATION_QUIRKS
515515
tristate
516516

517-
# Separate option because nomodeset parameter is global and expected built-in
518-
config DRM_NOMODESET
519-
bool
520-
default n
521-
522517
config DRM_LIB_RANDOM
523518
bool
524519
default n

0 commit comments

Comments
 (0)