Commit 0f08b315 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2020-03-18-1' of...

Merge tag 'drm-misc-fixes-2020-03-18-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

- drm/lease: fix WARNING in idr_destroy
- Fix AVI frame colorimetry in the dw-hdmi bridge.
- Fix compiler warning in komeda by annotating functions as __maybe_unused.
- Downgrade bochs pci_request_region failure from error to warning to
  workaround firmware fb.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7654ac39-deb8-c9ca-9fd5-ef77b2636380@linux.intel.com
parents fb33c651 b216a8e7
...@@ -146,14 +146,14 @@ static const struct of_device_id komeda_of_match[] = { ...@@ -146,14 +146,14 @@ static const struct of_device_id komeda_of_match[] = {
MODULE_DEVICE_TABLE(of, komeda_of_match); MODULE_DEVICE_TABLE(of, komeda_of_match);
static int komeda_rt_pm_suspend(struct device *dev) static int __maybe_unused komeda_rt_pm_suspend(struct device *dev)
{ {
struct komeda_drv *mdrv = dev_get_drvdata(dev); struct komeda_drv *mdrv = dev_get_drvdata(dev);
return komeda_dev_suspend(mdrv->mdev); return komeda_dev_suspend(mdrv->mdev);
} }
static int komeda_rt_pm_resume(struct device *dev) static int __maybe_unused komeda_rt_pm_resume(struct device *dev)
{ {
struct komeda_drv *mdrv = dev_get_drvdata(dev); struct komeda_drv *mdrv = dev_get_drvdata(dev);
......
...@@ -156,10 +156,8 @@ int bochs_hw_init(struct drm_device *dev) ...@@ -156,10 +156,8 @@ int bochs_hw_init(struct drm_device *dev)
size = min(size, mem); size = min(size, mem);
} }
if (pci_request_region(pdev, 0, "bochs-drm") != 0) { if (pci_request_region(pdev, 0, "bochs-drm") != 0)
DRM_ERROR("Cannot request framebuffer\n"); DRM_WARN("Cannot request framebuffer, boot fb still active?\n");
return -EBUSY;
}
bochs->fb_map = ioremap(addr, size); bochs->fb_map = ioremap(addr, size);
if (bochs->fb_map == NULL) { if (bochs->fb_map == NULL) {
......
...@@ -1624,28 +1624,34 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) ...@@ -1624,28 +1624,34 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
frame.colorspace = HDMI_COLORSPACE_RGB; frame.colorspace = HDMI_COLORSPACE_RGB;
/* Set up colorimetry */ /* Set up colorimetry */
switch (hdmi->hdmi_data.enc_out_encoding) { if (!hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) {
case V4L2_YCBCR_ENC_601: switch (hdmi->hdmi_data.enc_out_encoding) {
if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV601) case V4L2_YCBCR_ENC_601:
frame.colorimetry = HDMI_COLORIMETRY_EXTENDED; if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV601)
else frame.colorimetry = HDMI_COLORIMETRY_EXTENDED;
else
frame.colorimetry = HDMI_COLORIMETRY_ITU_601;
frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_601;
break;
case V4L2_YCBCR_ENC_709:
if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV709)
frame.colorimetry = HDMI_COLORIMETRY_EXTENDED;
else
frame.colorimetry = HDMI_COLORIMETRY_ITU_709;
frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_709;
break;
default: /* Carries no data */
frame.colorimetry = HDMI_COLORIMETRY_ITU_601; frame.colorimetry = HDMI_COLORIMETRY_ITU_601;
frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_601;
break;
}
} else {
frame.colorimetry = HDMI_COLORIMETRY_NONE;
frame.extended_colorimetry = frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; HDMI_EXTENDED_COLORIMETRY_XV_YCC_601;
break;
case V4L2_YCBCR_ENC_709:
if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV709)
frame.colorimetry = HDMI_COLORIMETRY_EXTENDED;
else
frame.colorimetry = HDMI_COLORIMETRY_ITU_709;
frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_709;
break;
default: /* Carries no data */
frame.colorimetry = HDMI_COLORIMETRY_ITU_601;
frame.extended_colorimetry =
HDMI_EXTENDED_COLORIMETRY_XV_YCC_601;
break;
} }
frame.scan_mode = HDMI_SCAN_MODE_NONE; frame.scan_mode = HDMI_SCAN_MODE_NONE;
......
...@@ -542,10 +542,12 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, ...@@ -542,10 +542,12 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
} }
DRM_DEBUG_LEASE("Creating lease\n"); DRM_DEBUG_LEASE("Creating lease\n");
/* lessee will take the ownership of leases */
lessee = drm_lease_create(lessor, &leases); lessee = drm_lease_create(lessor, &leases);
if (IS_ERR(lessee)) { if (IS_ERR(lessee)) {
ret = PTR_ERR(lessee); ret = PTR_ERR(lessee);
idr_destroy(&leases);
goto out_leases; goto out_leases;
} }
...@@ -580,7 +582,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, ...@@ -580,7 +582,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
out_leases: out_leases:
put_unused_fd(fd); put_unused_fd(fd);
idr_destroy(&leases);
DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl failed: %d\n", ret); DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl failed: %d\n", ret);
return ret; return ret;
......
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