Skip to content

Commit 9336127

Browse files
committed
Merge tag 'drm-misc-fixes-2020-11-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
two patches to fix dw-hdmi bind and detection code, and one fix for sun4i shared with arm-soc Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20201119083939.ddj3saipyg5iwvb4@gilmour
2 parents f95dddc + cdf117d commit 9336127

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,12 +2327,6 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi)
23272327
{
23282328
enum drm_connector_status result;
23292329

2330-
mutex_lock(&hdmi->mutex);
2331-
hdmi->force = DRM_FORCE_UNSPECIFIED;
2332-
dw_hdmi_update_power(hdmi);
2333-
dw_hdmi_update_phy_mask(hdmi);
2334-
mutex_unlock(&hdmi->mutex);
2335-
23362330
result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
23372331

23382332
mutex_lock(&hdmi->mutex);

drivers/gpu/drm/sun4i/sun4i_backend.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,15 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
814814
*
815815
* XXX(hch): this has no business in a driver and needs to move
816816
* to the device tree.
817+
*
818+
* If we have two subsequent calls to dma_direct_set_offset
819+
* returns -EINVAL. Unfortunately, this happens when we have two
820+
* backends in the system, and will result in the driver
821+
* reporting an error while it has been setup properly before.
822+
* Ignore EINVAL, but it should really be removed eventually.
817823
*/
818824
ret = dma_direct_set_offset(drm->dev, PHYS_OFFSET, 0, SZ_4G);
819-
if (ret)
825+
if (ret && ret != -EINVAL)
820826
return ret;
821827
}
822828

drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
208208
phy_node = of_parse_phandle(dev->of_node, "phys", 0);
209209
if (!phy_node) {
210210
dev_err(dev, "Can't found PHY phandle\n");
211+
ret = -EINVAL;
211212
goto err_disable_clk_tmds;
212213
}
213214

0 commit comments

Comments
 (0)