In core, DRM connectors now notify userspace of hotplug events via

sysfs. In drivers, sun4i now uses 4 bits to store the clock's m divider;
 ast sets up 24/32-bit color mode correctly.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl7h4c0ACgkQaA3BHVML
 eiP6Pgf9GN4XlZvsrH7lV+125XwlX4gMa0/MQguNldvr6HsMJfV0rFL5cNbLrjbx
 rLBD2INasf4iXeaUf4LIJPfPbjhHJlAqi3VePb9SH3+EaU23wfmY68rVcKU15z3k
 /0Csu06h70U10f8US+2qGn+82ZhT4au6s6+6bOfE7C4QIbi5jkmlB5ZiTQn2H/J3
 FUCYUxTEASjkYTXwYCaPdTVqITNzekd6Oun+C612oHcVQvFrPbhsCTz85v0q7RZJ
 Rd2PM6WKHLQEw55GEsGaMmzEKLm+xKlT5TCkZRVvCB6X2CLIShhuWun/qA+FfKXK
 +hDToj2B8BHf9b8LvPF+1tmD3BNZ2w==
 =vo9M
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-next-fixes-2020-06-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

In core, DRM connectors now notify userspace of hotplug events via
sysfs. In drivers, sun4i now uses 4 bits to store the clock's m divider;
ast sets up 24/32-bit color mode correctly.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200611075007.GA15098@linux-uq9g
This commit is contained in:
Dave Airlie 2020-06-11 17:51:06 +10:00
commit 66057dd1d1
5 changed files with 8 additions and 5 deletions

View File

@ -226,6 +226,7 @@ static void ast_set_vbios_color_reg(struct ast_private *ast,
case 3:
case 4:
color_index = TrueCModeIndex;
break;
default:
return;
}

View File

@ -27,6 +27,7 @@
#include <drm/drm_print.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_sysfs.h>
#include <linux/uaccess.h>
@ -523,6 +524,10 @@ int drm_connector_register(struct drm_connector *connector)
drm_mode_object_register(connector->dev, &connector->base);
connector->registration_state = DRM_CONNECTOR_REGISTERED;
/* Let userspace know we have a new connector */
drm_sysfs_hotplug_event(connector->dev);
goto unlock;
err_debugfs:

View File

@ -291,9 +291,6 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
return PTR_ERR(connector->kdev);
}
/* Let userspace know we have a new connector */
drm_sysfs_hotplug_event(dev);
if (connector->ddc)
return sysfs_create_link(&connector->kdev->kobj,
&connector->ddc->dev.kobj, "ddc");

View File

@ -148,7 +148,7 @@
#define SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE 3
#define SUN4I_HDMI_DDC_CLK_REG 0x528
#define SUN4I_HDMI_DDC_CLK_M(m) (((m) & 0x7) << 3)
#define SUN4I_HDMI_DDC_CLK_M(m) (((m) & 0xf) << 3)
#define SUN4I_HDMI_DDC_CLK_N(n) ((n) & 0x7)
#define SUN4I_HDMI_DDC_LINE_CTRL_REG 0x540

View File

@ -33,7 +33,7 @@ static unsigned long sun4i_ddc_calc_divider(unsigned long rate,
unsigned long best_rate = 0;
u8 best_m = 0, best_n = 0, _m, _n;
for (_m = 0; _m < 8; _m++) {
for (_m = 0; _m < 16; _m++) {
for (_n = 0; _n < 8; _n++) {
unsigned long tmp_rate;