Commit 66057dd1 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-next-fixes-2020-06-11' of...

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: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200611075007.GA15098@linux-uq9g
parents addb1e23 291ddeb6
...@@ -226,6 +226,7 @@ static void ast_set_vbios_color_reg(struct ast_private *ast, ...@@ -226,6 +226,7 @@ static void ast_set_vbios_color_reg(struct ast_private *ast,
case 3: case 3:
case 4: case 4:
color_index = TrueCModeIndex; color_index = TrueCModeIndex;
break;
default: default:
return; return;
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <drm/drm_print.h> #include <drm/drm_print.h>
#include <drm/drm_drv.h> #include <drm/drm_drv.h>
#include <drm/drm_file.h> #include <drm/drm_file.h>
#include <drm/drm_sysfs.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
...@@ -523,6 +524,10 @@ int drm_connector_register(struct drm_connector *connector) ...@@ -523,6 +524,10 @@ int drm_connector_register(struct drm_connector *connector)
drm_mode_object_register(connector->dev, &connector->base); drm_mode_object_register(connector->dev, &connector->base);
connector->registration_state = DRM_CONNECTOR_REGISTERED; connector->registration_state = DRM_CONNECTOR_REGISTERED;
/* Let userspace know we have a new connector */
drm_sysfs_hotplug_event(connector->dev);
goto unlock; goto unlock;
err_debugfs: err_debugfs:
......
...@@ -291,9 +291,6 @@ int drm_sysfs_connector_add(struct drm_connector *connector) ...@@ -291,9 +291,6 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
return PTR_ERR(connector->kdev); return PTR_ERR(connector->kdev);
} }
/* Let userspace know we have a new connector */
drm_sysfs_hotplug_event(dev);
if (connector->ddc) if (connector->ddc)
return sysfs_create_link(&connector->kdev->kobj, return sysfs_create_link(&connector->kdev->kobj,
&connector->ddc->dev.kobj, "ddc"); &connector->ddc->dev.kobj, "ddc");
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
#define SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE 3 #define SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE 3
#define SUN4I_HDMI_DDC_CLK_REG 0x528 #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_CLK_N(n) ((n) & 0x7)
#define SUN4I_HDMI_DDC_LINE_CTRL_REG 0x540 #define SUN4I_HDMI_DDC_LINE_CTRL_REG 0x540
......
...@@ -33,7 +33,7 @@ static unsigned long sun4i_ddc_calc_divider(unsigned long rate, ...@@ -33,7 +33,7 @@ static unsigned long sun4i_ddc_calc_divider(unsigned long rate,
unsigned long best_rate = 0; unsigned long best_rate = 0;
u8 best_m = 0, best_n = 0, _m, _n; 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++) { for (_n = 0; _n < 8; _n++) {
unsigned long tmp_rate; unsigned long tmp_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment