Skip to content

Commit 2ba446f

Browse files
committed
Merge tag 'shmob-drm-atomic-dt-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into drm-next
drm: renesas: shmobile: Atomic conversion + DT support Currently, there are two drivers for the LCD controller on Renesas SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs: 1. sh_mobile_lcdcfb, using the fbdev framework, 2. shmob_drm, using the DRM framework. However, only the former driver is used, as all platform support integrates the former. None of these drivers support DT-based systems. Convert the SH-Mobile DRM driver to atomic modesetting, and add DT support, complemented by the customary set of fixes and improvements. Acked-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Dave Airlie <[email protected]> From: Geert Uytterhoeven <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAMuHMdUF61V5qNyKbrTGxZfEJvCVuLO7q2R5MqZYkzRC_cNr0w@mail.gmail.com
2 parents 6318080 + 1399eba commit 2ba446f

File tree

17 files changed

+860
-813
lines changed

17 files changed

+860
-813
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/renesas,shmobile-lcdc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas SH-Mobile LCD Controller (LCDC)
8+
9+
maintainers:
10+
- Laurent Pinchart <[email protected]>
11+
- Geert Uytterhoeven <[email protected]>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- renesas,r8a7740-lcdc # R-Mobile A1
17+
- renesas,sh73a0-lcdc # SH-Mobile AG5
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
clocks:
26+
minItems: 1
27+
maxItems: 5
28+
description:
29+
Only the functional clock is mandatory.
30+
Some of the optional clocks are model-dependent (e.g. "video" (a.k.a.
31+
"vou" or "dv_clk") is available on R-Mobile A1 only).
32+
33+
clock-names:
34+
minItems: 1
35+
items:
36+
- const: fck
37+
- enum: [ media, lclk, hdmi, video ]
38+
- enum: [ media, lclk, hdmi, video ]
39+
- enum: [ media, lclk, hdmi, video ]
40+
- enum: [ media, lclk, hdmi, video ]
41+
42+
power-domains:
43+
maxItems: 1
44+
45+
ports:
46+
$ref: /schemas/graph.yaml#/properties/ports
47+
48+
properties:
49+
port@0:
50+
$ref: /schemas/graph.yaml#/properties/port
51+
description: LCD port (R-Mobile A1 and SH-Mobile AG5)
52+
unevaluatedProperties: false
53+
54+
port@1:
55+
$ref: /schemas/graph.yaml#/properties/port
56+
description: HDMI port (R-Mobile A1 LCDC1 and SH-Mobile AG5)
57+
unevaluatedProperties: false
58+
59+
port@2:
60+
$ref: /schemas/graph.yaml#/properties/port
61+
description: MIPI-DSI port (SH-Mobile AG5)
62+
unevaluatedProperties: false
63+
64+
required:
65+
- port@0
66+
67+
unevaluatedProperties: false
68+
69+
required:
70+
- compatible
71+
- reg
72+
- interrupts
73+
- clocks
74+
- clock-names
75+
- power-domains
76+
- ports
77+
78+
additionalProperties: false
79+
80+
allOf:
81+
- if:
82+
properties:
83+
compatible:
84+
contains:
85+
const: renesas,r8a7740-lcdc
86+
then:
87+
properties:
88+
ports:
89+
properties:
90+
port@2: false
91+
92+
- if:
93+
properties:
94+
compatible:
95+
contains:
96+
const: renesas,sh73a0-lcdc
97+
then:
98+
properties:
99+
ports:
100+
required:
101+
- port@1
102+
- port@2
103+
104+
examples:
105+
- |
106+
#include <dt-bindings/clock/r8a7740-clock.h>
107+
#include <dt-bindings/interrupt-controller/arm-gic.h>
108+
109+
lcd-controller@fe940000 {
110+
compatible = "renesas,r8a7740-lcdc";
111+
reg = <0xfe940000 0x4000>;
112+
interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
113+
clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
114+
<&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
115+
<&vou_clk>;
116+
clock-names = "fck", "media", "lclk", "video";
117+
power-domains = <&pd_a4lc>;
118+
119+
ports {
120+
#address-cells = <1>;
121+
#size-cells = <0>;
122+
123+
port@0 {
124+
reg = <0>;
125+
126+
lcdc0_rgb: endpoint {
127+
};
128+
};
129+
};
130+
};

Documentation/userspace-api/media/v4l/subdev-formats.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,78 @@ The following tables list existing packed RGB formats.
949949
- b\ :sub:`2`
950950
- b\ :sub:`1`
951951
- b\ :sub:`0`
952+
* .. _MEDIA-BUS-FMT-RGB666-2X9-BE:
953+
954+
- MEDIA_BUS_FMT_RGB666_2X9_BE
955+
- 0x1025
956+
-
957+
-
958+
-
959+
-
960+
-
961+
-
962+
-
963+
-
964+
-
965+
-
966+
-
967+
-
968+
-
969+
-
970+
-
971+
-
972+
-
973+
-
974+
-
975+
-
976+
-
977+
-
978+
-
979+
-
980+
- r\ :sub:`5`
981+
- r\ :sub:`4`
982+
- r\ :sub:`3`
983+
- r\ :sub:`2`
984+
- r\ :sub:`1`
985+
- r\ :sub:`0`
986+
- g\ :sub:`5`
987+
- g\ :sub:`4`
988+
- g\ :sub:`3`
989+
* -
990+
-
991+
-
992+
-
993+
-
994+
-
995+
-
996+
-
997+
-
998+
-
999+
-
1000+
-
1001+
-
1002+
-
1003+
-
1004+
-
1005+
-
1006+
-
1007+
-
1008+
-
1009+
-
1010+
-
1011+
-
1012+
-
1013+
-
1014+
-
1015+
- g\ :sub:`2`
1016+
- g\ :sub:`1`
1017+
- g\ :sub:`0`
1018+
- b\ :sub:`5`
1019+
- b\ :sub:`4`
1020+
- b\ :sub:`3`
1021+
- b\ :sub:`2`
1022+
- b\ :sub:`1`
1023+
- b\ :sub:`0`
9521024
* .. _MEDIA-BUS-FMT-BGR666-1X18:
9531025

9541026
- MEDIA_BUS_FMT_BGR666_1X18

MAINTAINERS

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7053,7 +7053,7 @@ F: drivers/gpu/host1x/
70537053
F: include/linux/host1x.h
70547054
F: include/uapi/drm/tegra_drm.h
70557055

7056-
DRM DRIVERS FOR RENESAS
7056+
DRM DRIVERS FOR RENESAS R-CAR
70577057
M: Laurent Pinchart <[email protected]>
70587058
M: Kieran Bingham <[email protected]>
70597059
@@ -7064,7 +7064,16 @@ F: Documentation/devicetree/bindings/display/bridge/renesas,dsi-csi2-tx.yaml
70647064
F: Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml
70657065
F: Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
70667066
F: Documentation/devicetree/bindings/display/renesas,du.yaml
7067-
F: drivers/gpu/drm/renesas/
7067+
F: drivers/gpu/drm/renesas/rcar-du/
7068+
7069+
DRM DRIVERS FOR RENESAS SHMOBILE
7070+
M: Laurent Pinchart <[email protected]>
7071+
M: Geert Uytterhoeven <[email protected]>
7072+
7073+
7074+
S: Supported
7075+
F: Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
7076+
F: drivers/gpu/drm/renesas/shmobile/
70687077
F: include/linux/platform_data/shmob_drm.h
70697078

70707079
DRM DRIVERS FOR ROCKCHIP

drivers/gpu/drm/renesas/shmobile/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# SPDX-License-Identifier: GPL-2.0
22
config DRM_SHMOBILE
33
tristate "DRM Support for SH Mobile"
4-
depends on DRM
4+
depends on DRM && PM
55
depends on ARCH_RENESAS || ARCH_SHMOBILE || COMPILE_TEST
66
select BACKLIGHT_CLASS_DEVICE
77
select DRM_KMS_HELPER
88
select DRM_GEM_DMA_HELPER
9+
select VIDEOMODE_HELPERS
910
help
1011
Choose this option if you have an SH Mobile chipset.
1112
If M is selected the module will be called shmob-drm.

drivers/gpu/drm/renesas/shmobile/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
shmob-drm-y := shmob_drm_backlight.o \
3-
shmob_drm_crtc.o \
2+
shmob-drm-y := shmob_drm_crtc.o \
43
shmob_drm_drv.o \
54
shmob_drm_kms.o \
65
shmob_drm_plane.o

drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.c

Lines changed: 0 additions & 82 deletions
This file was deleted.

drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)