Commit 2213b666 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes

Core Changes:
- dp: A few fixes in drm_dp_downstream_debug() (Chris)
- rockchip: sanitize the Kconfig dependencies (fallout from EXTCON) (Arnd)
- host1x: Free the iommu domain when attach_device fails (Paul)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Kocialkowski <contact@paulk.fr>

* tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc:
  gpu: host1x: Free the IOMMU domain when there is no device to attach
  drm/rockchip: fix Kconfig dependencies
  drm/dp: Don't trust drm_dp_downstream_id()
  drm/dp: Fix read pointer for drm_dp_downsteam_debug()
parents 517069ff fea20995
...@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m, ...@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
DP_DETAILED_CAP_INFO_AVAILABLE; DP_DETAILED_CAP_INFO_AVAILABLE;
int clk; int clk;
int bpc; int bpc;
char id[6]; char id[7];
int len; int len;
uint8_t rev[2]; uint8_t rev[2];
int type = port_cap[0] & DP_DS_PORT_TYPE_MASK; int type = port_cap[0] & DP_DS_PORT_TYPE_MASK;
...@@ -583,6 +583,7 @@ void drm_dp_downstream_debug(struct seq_file *m, ...@@ -583,6 +583,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
seq_puts(m, "\t\tType: N/A\n"); seq_puts(m, "\t\tType: N/A\n");
} }
memset(id, 0, sizeof(id));
drm_dp_downstream_id(aux, id); drm_dp_downstream_id(aux, id);
seq_printf(m, "\t\tID: %s\n", id); seq_printf(m, "\t\tID: %s\n", id);
...@@ -591,7 +592,7 @@ void drm_dp_downstream_debug(struct seq_file *m, ...@@ -591,7 +592,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
seq_printf(m, "\t\tHW: %d.%d\n", seq_printf(m, "\t\tHW: %d.%d\n",
(rev[0] & 0xf0) >> 4, rev[0] & 0xf); (rev[0] & 0xf0) >> 4, rev[0] & 0xf);
len = drm_dp_dpcd_read(aux, DP_BRANCH_SW_REV, &rev, 2); len = drm_dp_dpcd_read(aux, DP_BRANCH_SW_REV, rev, 2);
if (len > 0) if (len > 0)
seq_printf(m, "\t\tSW: %d.%d\n", rev[0], rev[1]); seq_printf(m, "\t\tSW: %d.%d\n", rev[0], rev[1]);
......
...@@ -5,6 +5,10 @@ config DRM_ROCKCHIP ...@@ -5,6 +5,10 @@ config DRM_ROCKCHIP
select DRM_KMS_HELPER select DRM_KMS_HELPER
select DRM_PANEL select DRM_PANEL
select VIDEOMODE_HELPERS select VIDEOMODE_HELPERS
select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP
select DRM_DW_HDMI if ROCKCHIP_DW_HDMI
select DRM_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI
select SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC
help help
Choose this option if you have a Rockchip soc chipset. Choose this option if you have a Rockchip soc chipset.
This driver provides kernel mode setting and buffer This driver provides kernel mode setting and buffer
...@@ -12,10 +16,10 @@ config DRM_ROCKCHIP ...@@ -12,10 +16,10 @@ config DRM_ROCKCHIP
2D or 3D acceleration; acceleration is performed by other 2D or 3D acceleration; acceleration is performed by other
IP found on the SoC. IP found on the SoC.
if DRM_ROCKCHIP
config ROCKCHIP_ANALOGIX_DP config ROCKCHIP_ANALOGIX_DP
bool "Rockchip specific extensions for Analogix DP driver" bool "Rockchip specific extensions for Analogix DP driver"
depends on DRM_ROCKCHIP
select DRM_ANALOGIX_DP
help help
This selects support for Rockchip SoC specific extensions This selects support for Rockchip SoC specific extensions
for the Analogix Core DP driver. If you want to enable DP for the Analogix Core DP driver. If you want to enable DP
...@@ -23,9 +27,7 @@ config ROCKCHIP_ANALOGIX_DP ...@@ -23,9 +27,7 @@ config ROCKCHIP_ANALOGIX_DP
config ROCKCHIP_CDN_DP config ROCKCHIP_CDN_DP
bool "Rockchip cdn DP" bool "Rockchip cdn DP"
depends on DRM_ROCKCHIP depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m)
depends on EXTCON
select SND_SOC_HDMI_CODEC if SND_SOC
help help
This selects support for Rockchip SoC specific extensions This selects support for Rockchip SoC specific extensions
for the cdn DP driver. If you want to enable Dp on for the cdn DP driver. If you want to enable Dp on
...@@ -34,8 +36,6 @@ config ROCKCHIP_CDN_DP ...@@ -34,8 +36,6 @@ config ROCKCHIP_CDN_DP
config ROCKCHIP_DW_HDMI config ROCKCHIP_DW_HDMI
bool "Rockchip specific extensions for Synopsys DW HDMI" bool "Rockchip specific extensions for Synopsys DW HDMI"
depends on DRM_ROCKCHIP
select DRM_DW_HDMI
help help
This selects support for Rockchip SoC specific extensions This selects support for Rockchip SoC specific extensions
for the Synopsys DesignWare HDMI driver. If you want to for the Synopsys DesignWare HDMI driver. If you want to
...@@ -44,8 +44,6 @@ config ROCKCHIP_DW_HDMI ...@@ -44,8 +44,6 @@ config ROCKCHIP_DW_HDMI
config ROCKCHIP_DW_MIPI_DSI config ROCKCHIP_DW_MIPI_DSI
bool "Rockchip specific extensions for Synopsys DW MIPI DSI" bool "Rockchip specific extensions for Synopsys DW MIPI DSI"
depends on DRM_ROCKCHIP
select DRM_MIPI_DSI
help help
This selects support for Rockchip SoC specific extensions This selects support for Rockchip SoC specific extensions
for the Synopsys DesignWare HDMI driver. If you want to for the Synopsys DesignWare HDMI driver. If you want to
...@@ -54,8 +52,9 @@ config ROCKCHIP_DW_MIPI_DSI ...@@ -54,8 +52,9 @@ config ROCKCHIP_DW_MIPI_DSI
config ROCKCHIP_INNO_HDMI config ROCKCHIP_INNO_HDMI
bool "Rockchip specific extensions for Innosilicon HDMI" bool "Rockchip specific extensions for Innosilicon HDMI"
depends on DRM_ROCKCHIP
help help
This selects support for Rockchip SoC specific extensions This selects support for Rockchip SoC specific extensions
for the Innosilicon HDMI driver. If you want to enable for the Innosilicon HDMI driver. If you want to enable
HDMI on RK3036 based SoC, you should select this option. HDMI on RK3036 based SoC, you should select this option.
endif
...@@ -186,8 +186,13 @@ static int host1x_probe(struct platform_device *pdev) ...@@ -186,8 +186,13 @@ static int host1x_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
err = iommu_attach_device(host->domain, &pdev->dev); err = iommu_attach_device(host->domain, &pdev->dev);
if (err) if (err == -ENODEV) {
iommu_domain_free(host->domain);
host->domain = NULL;
goto skip_iommu;
} else if (err) {
goto fail_free_domain; goto fail_free_domain;
}
geometry = &host->domain->geometry; geometry = &host->domain->geometry;
...@@ -198,6 +203,7 @@ static int host1x_probe(struct platform_device *pdev) ...@@ -198,6 +203,7 @@ static int host1x_probe(struct platform_device *pdev)
host->iova_end = geometry->aperture_end; host->iova_end = geometry->aperture_end;
} }
skip_iommu:
err = host1x_channel_list_init(&host->channel_list, err = host1x_channel_list_init(&host->channel_list,
host->info->nb_channels); host->info->nb_channels);
if (err) { if (err) {
......
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