Skip to content

Commit 9ac4beb

Browse files
committed
Merge tag 'drm-misc-next-2024-02-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.9: UAPI Changes: Cross-subsystem Changes: arch: - powerpc/ps3: select CONFIG_VIDEO Core Changes: ci: - msm: fix apq8016 runner display: - use newer DRM print helpers documentation: - fix typos print: - add device-specific error and debug printers sysfb: - set Linux parent device for firmware framebuffer tests: - mm: use newer DRM print helpers Driver Changes: bridge: - switch to ->read_edid callback throughout the bridge drivers - remove old ->get_edid callback i915: - use newer DRM print helpers lima: - improve stability by fixes to error handling and recovery mediathek: - switch to ->read_edid callback msm: - switch to ->read_edid callback omap: - switch to ->read_edid callback panel: - add Powkiddy RGB10MAX3 plus DT bindings - st7703: support panel rotation plus DT bindings rockchip: - DT bindings: remove port, add power-domains xe: - use newer DRM print helpers xlnx: - switch to ->read_edid callback Signed-off-by: Dave Airlie <airlied@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmXOD/oACgkQaA3BHVML # eiMWMAgArTVXF4UQ+FUxYZB5QTm2veYIpilvwmzaQLNxsM9SsWpzwMIVAi+xf93g # uqUqkl6QvZ9pJg6bxuXRNcJw/GObIO4x6tn+LkbccczgHiHwvn6ydNdUoMx8ulne # EsGC0z8bb5Gpwh9b/pnBul2AoIE7PHAJltgH271/O2xnhFMUbchQ0ckHvWnn8/GA # Nef145ySX4gkYtY8u2TRr4r6Bkp7Tpiyv6ipU7Cpu7KqyveTDMx3c9r5FaiHnJT/ # Hx/5s87q0Bx2m+iNjlBLJzYjF2UWth+pbfiu3xwyWOE7hdkPLwCQ5mqHWcFFqxfb # Vuj9jP+Vb68L7EvGpq2LArLdhZjHIQ== # =SsjX # -----END PGP SIGNATURE----- # gpg: Signature made Thu 15 Feb 2024 23:22:02 AEST # gpg: using RSA key 7217FBAC8CE9CF6344A168E5680DC11D530B7A23 # gpg: Can't check signature: No public key From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240215132610.GA1464@localhost.localdomain
2 parents 6f167a3 + aa1267e commit 9ac4beb

Some content is hidden

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

74 files changed

+1186
-567
lines changed

Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ properties:
2222
enum:
2323
# Anberic RG353V-V2 5.0" 640x480 TFT LCD panel
2424
- anbernic,rg353v-panel-v2
25+
# Powkiddy RGB10MAX3 5.0" 720x1280 TFT LCD panel
26+
- powkiddy,rgb10max3-panel
2527
# Powkiddy RGB30 3.0" 720x720 TFT LCD panel
2628
- powkiddy,rgb30-panel
2729
# Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
@@ -43,6 +45,7 @@ properties:
4345
reset-gpios: true
4446

4547
backlight: true
48+
rotation: true
4649

4750
required:
4851
- compatible

Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ properties:
9494
- const: default
9595
- const: unwedge
9696

97+
power-domains:
98+
maxItems: 1
99+
97100
ports:
98101
$ref: /schemas/graph.yaml#/properties/ports
99102

100-
patternProperties:
101-
"^port(@0)?$":
103+
properties:
104+
port@0:
102105
$ref: /schemas/graph.yaml#/properties/port
103106
description: Input of the DWC HDMI TX
104107
properties:
@@ -108,11 +111,14 @@ properties:
108111
description: Connection to the VOPB
109112
endpoint@1:
110113
description: Connection to the VOPL
111-
properties:
112114
port@1:
113115
$ref: /schemas/graph.yaml#/properties/port
114116
description: Output of the DWC HDMI TX
115117

118+
required:
119+
- port@0
120+
- port@1
121+
116122
rockchip,grf:
117123
$ref: /schemas/types.yaml#/definitions/phandle
118124
description:
@@ -135,31 +141,46 @@ examples:
135141
#include <dt-bindings/clock/rk3288-cru.h>
136142
#include <dt-bindings/interrupt-controller/arm-gic.h>
137143
#include <dt-bindings/interrupt-controller/irq.h>
144+
#include <dt-bindings/power/rk3288-power.h>
138145
139146
hdmi: hdmi@ff980000 {
140147
compatible = "rockchip,rk3288-dw-hdmi";
141148
reg = <0xff980000 0x20000>;
142149
reg-io-width = <4>;
143-
ddc-i2c-bus = <&i2c5>;
144-
rockchip,grf = <&grf>;
145150
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
146151
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
147152
clock-names = "iahb", "isfr";
153+
ddc-i2c-bus = <&i2c5>;
154+
power-domains = <&power RK3288_PD_VIO>;
155+
rockchip,grf = <&grf>;
148156
149157
ports {
150-
port {
158+
#address-cells = <1>;
159+
#size-cells = <0>;
160+
161+
port@0 {
162+
reg = <0>;
151163
#address-cells = <1>;
152164
#size-cells = <0>;
153165
154166
hdmi_in_vopb: endpoint@0 {
155167
reg = <0>;
156168
remote-endpoint = <&vopb_out_hdmi>;
157169
};
170+
158171
hdmi_in_vopl: endpoint@1 {
159172
reg = <1>;
160173
remote-endpoint = <&vopl_out_hdmi>;
161174
};
162175
};
176+
177+
port@1 {
178+
reg = <1>;
179+
180+
hdmi_out_con: endpoint {
181+
remote-endpoint = <&hdmi_con_in>;
182+
};
183+
};
163184
};
164185
};
165186

arch/powerpc/platforms/ps3/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ config PS3_VUART
6767
config PS3_PS3AV
6868
depends on PPC_PS3
6969
tristate "PS3 AV settings driver" if PS3_ADVANCED
70+
select VIDEO
7071
select PS3_VUART
7172
default y
7273
help

drivers/firmware/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ config MTK_ADSP_IPC
182182
config SYSFB
183183
bool
184184
select BOOT_VESA_SUPPORT
185+
select SCREEN_INFO
185186

186187
config SYSFB_SIMPLEFB
187188
bool "Mark VGA/VBE/EFI FB as generic system framebuffer"

drivers/firmware/sysfb.c

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/init.h>
3030
#include <linux/kernel.h>
3131
#include <linux/mm.h>
32+
#include <linux/pci.h>
3233
#include <linux/platform_data/simplefb.h>
3334
#include <linux/platform_device.h>
3435
#include <linux/screen_info.h>
@@ -69,24 +70,70 @@ void sysfb_disable(void)
6970
}
7071
EXPORT_SYMBOL_GPL(sysfb_disable);
7172

73+
#if defined(CONFIG_PCI)
74+
static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
75+
{
76+
/*
77+
* TODO: Try to integrate this code into the PCI subsystem
78+
*/
79+
int ret;
80+
u16 command;
81+
82+
ret = pci_read_config_word(pdev, PCI_COMMAND, &command);
83+
if (ret != PCIBIOS_SUCCESSFUL)
84+
return false;
85+
if (!(command & PCI_COMMAND_MEMORY))
86+
return false;
87+
return true;
88+
}
89+
#else
90+
static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
91+
{
92+
return false;
93+
}
94+
#endif
95+
96+
static __init struct device *sysfb_parent_dev(const struct screen_info *si)
97+
{
98+
struct pci_dev *pdev;
99+
100+
pdev = screen_info_pci_dev(si);
101+
if (IS_ERR(pdev)) {
102+
return ERR_CAST(pdev);
103+
} else if (pdev) {
104+
if (!sysfb_pci_dev_is_enabled(pdev))
105+
return ERR_PTR(-ENODEV);
106+
return &pdev->dev;
107+
}
108+
109+
return NULL;
110+
}
111+
72112
static __init int sysfb_init(void)
73113
{
74114
struct screen_info *si = &screen_info;
115+
struct device *parent;
75116
struct simplefb_platform_data mode;
76117
const char *name;
77118
bool compatible;
78119
int ret = 0;
79120

121+
screen_info_apply_fixups();
122+
80123
mutex_lock(&disable_lock);
81124
if (disabled)
82125
goto unlock_mutex;
83126

84127
sysfb_apply_efi_quirks();
85128

129+
parent = sysfb_parent_dev(si);
130+
if (IS_ERR(parent))
131+
goto unlock_mutex;
132+
86133
/* try to create a simple-framebuffer device */
87134
compatible = sysfb_parse_mode(si, &mode);
88135
if (compatible) {
89-
pd = sysfb_create_simplefb(si, &mode);
136+
pd = sysfb_create_simplefb(si, &mode, parent);
90137
if (!IS_ERR(pd))
91138
goto unlock_mutex;
92139
}
@@ -109,6 +156,8 @@ static __init int sysfb_init(void)
109156
goto unlock_mutex;
110157
}
111158

159+
pd->dev.parent = parent;
160+
112161
sysfb_set_efifb_fwnode(pd);
113162

114163
ret = platform_device_add_data(pd, si, sizeof(*si));

drivers/firmware/sysfb_simplefb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ __init bool sysfb_parse_mode(const struct screen_info *si,
9191
}
9292

9393
__init struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
94-
const struct simplefb_platform_data *mode)
94+
const struct simplefb_platform_data *mode,
95+
struct device *parent)
9596
{
9697
struct platform_device *pd;
9798
struct resource res;
@@ -143,6 +144,8 @@ __init struct platform_device *sysfb_create_simplefb(const struct screen_info *s
143144
if (!pd)
144145
return ERR_PTR(-ENOMEM);
145146

147+
pd->dev.parent = parent;
148+
146149
sysfb_set_efifb_fwnode(pd);
147150

148151
ret = platform_device_add_resources(pd, &res, 1);

drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,10 @@ static int adv7511_get_edid_block(void *data, u8 *buf, unsigned int block,
604604
* ADV75xx helpers
605605
*/
606606

607-
static struct edid *adv7511_get_edid(struct adv7511 *adv7511,
608-
struct drm_connector *connector)
607+
static const struct drm_edid *adv7511_edid_read(struct adv7511 *adv7511,
608+
struct drm_connector *connector)
609609
{
610-
struct edid *edid;
610+
const struct drm_edid *drm_edid;
611611

612612
/* Reading the EDID only works if the device is powered */
613613
if (!adv7511->powered) {
@@ -621,31 +621,44 @@ static struct edid *adv7511_get_edid(struct adv7511 *adv7511,
621621
edid_i2c_addr);
622622
}
623623

624-
edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);
624+
drm_edid = drm_edid_read_custom(connector, adv7511_get_edid_block, adv7511);
625625

626626
if (!adv7511->powered)
627627
__adv7511_power_off(adv7511);
628628

629-
adv7511_set_config_csc(adv7511, connector, adv7511->rgb,
630-
drm_detect_hdmi_monitor(edid));
629+
if (drm_edid) {
630+
/*
631+
* FIXME: The CEC physical address should be set using
632+
* cec_s_phys_addr(adap,
633+
* connector->display_info.source_physical_address, false) from
634+
* a path that has read the EDID and called
635+
* drm_edid_connector_update().
636+
*/
637+
const struct edid *edid = drm_edid_raw(drm_edid);
638+
639+
adv7511_set_config_csc(adv7511, connector, adv7511->rgb,
640+
drm_detect_hdmi_monitor(edid));
631641

632-
cec_s_phys_addr_from_edid(adv7511->cec_adap, edid);
642+
cec_s_phys_addr_from_edid(adv7511->cec_adap, edid);
643+
} else {
644+
cec_s_phys_addr_from_edid(adv7511->cec_adap, NULL);
645+
}
633646

634-
return edid;
647+
return drm_edid;
635648
}
636649

637650
static int adv7511_get_modes(struct adv7511 *adv7511,
638651
struct drm_connector *connector)
639652
{
640-
struct edid *edid;
653+
const struct drm_edid *drm_edid;
641654
unsigned int count;
642655

643-
edid = adv7511_get_edid(adv7511, connector);
656+
drm_edid = adv7511_edid_read(adv7511, connector);
644657

645-
drm_connector_update_edid_property(connector, edid);
646-
count = drm_add_edid_modes(connector, edid);
658+
drm_edid_connector_update(connector, drm_edid);
659+
count = drm_edid_connector_add_modes(connector);
647660

648-
kfree(edid);
661+
drm_edid_free(drm_edid);
649662

650663
return count;
651664
}
@@ -953,12 +966,12 @@ static enum drm_connector_status adv7511_bridge_detect(struct drm_bridge *bridge
953966
return adv7511_detect(adv, NULL);
954967
}
955968

956-
static struct edid *adv7511_bridge_get_edid(struct drm_bridge *bridge,
957-
struct drm_connector *connector)
969+
static const struct drm_edid *adv7511_bridge_edid_read(struct drm_bridge *bridge,
970+
struct drm_connector *connector)
958971
{
959972
struct adv7511 *adv = bridge_to_adv7511(bridge);
960973

961-
return adv7511_get_edid(adv, connector);
974+
return adv7511_edid_read(adv, connector);
962975
}
963976

964977
static void adv7511_bridge_hpd_notify(struct drm_bridge *bridge,
@@ -977,7 +990,7 @@ static const struct drm_bridge_funcs adv7511_bridge_funcs = {
977990
.mode_valid = adv7511_bridge_mode_valid,
978991
.attach = adv7511_bridge_attach,
979992
.detect = adv7511_bridge_detect,
980-
.get_edid = adv7511_bridge_get_edid,
993+
.edid_read = adv7511_bridge_edid_read,
981994
.hpd_notify = adv7511_bridge_hpd_notify,
982995
};
983996

drivers/gpu/drm/bridge/analogix/anx7625.c

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,24 +1784,14 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
17841784
return ret;
17851785
}
17861786

1787-
static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
1787+
static const struct drm_edid *anx7625_edid_read(struct anx7625_data *ctx)
17881788
{
17891789
struct device *dev = ctx->dev;
17901790
struct s_edid_data *p_edid = &ctx->slimport_edid_p;
17911791
int edid_num;
1792-
u8 *edid;
17931792

1794-
edid = kmalloc(FOUR_BLOCK_SIZE, GFP_KERNEL);
1795-
if (!edid) {
1796-
DRM_DEV_ERROR(dev, "Fail to allocate buffer\n");
1797-
return NULL;
1798-
}
1799-
1800-
if (ctx->slimport_edid_p.edid_block_num > 0) {
1801-
memcpy(edid, ctx->slimport_edid_p.edid_raw_data,
1802-
FOUR_BLOCK_SIZE);
1803-
return (struct edid *)edid;
1804-
}
1793+
if (ctx->slimport_edid_p.edid_block_num > 0)
1794+
goto out;
18051795

18061796
pm_runtime_get_sync(dev);
18071797
_anx7625_hpd_polling(ctx, 5000 * 100);
@@ -1810,14 +1800,14 @@ static struct edid *anx7625_get_edid(struct anx7625_data *ctx)
18101800

18111801
if (edid_num < 1) {
18121802
DRM_DEV_ERROR(dev, "Fail to read EDID: %d\n", edid_num);
1813-
kfree(edid);
18141803
return NULL;
18151804
}
18161805

18171806
p_edid->edid_block_num = edid_num;
18181807

1819-
memcpy(edid, ctx->slimport_edid_p.edid_raw_data, FOUR_BLOCK_SIZE);
1820-
return (struct edid *)edid;
1808+
out:
1809+
return drm_edid_alloc(ctx->slimport_edid_p.edid_raw_data,
1810+
FOUR_BLOCK_SIZE);
18211811
}
18221812

18231813
static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
@@ -2492,15 +2482,15 @@ anx7625_bridge_detect(struct drm_bridge *bridge)
24922482
return anx7625_sink_detect(ctx);
24932483
}
24942484

2495-
static struct edid *anx7625_bridge_get_edid(struct drm_bridge *bridge,
2496-
struct drm_connector *connector)
2485+
static const struct drm_edid *anx7625_bridge_edid_read(struct drm_bridge *bridge,
2486+
struct drm_connector *connector)
24972487
{
24982488
struct anx7625_data *ctx = bridge_to_anx7625(bridge);
24992489
struct device *dev = ctx->dev;
25002490

25012491
DRM_DEV_DEBUG_DRIVER(dev, "drm bridge get edid\n");
25022492

2503-
return anx7625_get_edid(ctx);
2493+
return anx7625_edid_read(ctx);
25042494
}
25052495

25062496
static const struct drm_bridge_funcs anx7625_bridge_funcs = {
@@ -2515,7 +2505,7 @@ static const struct drm_bridge_funcs anx7625_bridge_funcs = {
25152505
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
25162506
.atomic_reset = drm_atomic_helper_bridge_reset,
25172507
.detect = anx7625_bridge_detect,
2518-
.get_edid = anx7625_bridge_get_edid,
2508+
.edid_read = anx7625_bridge_edid_read,
25192509
};
25202510

25212511
static int anx7625_register_i2c_dummy_clients(struct anx7625_data *ctx,

0 commit comments

Comments
 (0)