Commit a9fe6f18 authored by Dave Airlie's avatar Dave Airlie

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

A few minor fixes for an ordering issue in virtio, an (old) gcc warning
in sun4i, a probe issue in ingenic-drm and a regression in the HDCP
support.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200507160130.id64niqgf5wsha4u@gilmour.lan
parents c61b0b97 5fe89a6a
...@@ -241,8 +241,12 @@ static int drm_hdcp_request_srm(struct drm_device *drm_dev, ...@@ -241,8 +241,12 @@ static int drm_hdcp_request_srm(struct drm_device *drm_dev,
ret = request_firmware_direct(&fw, (const char *)fw_name, ret = request_firmware_direct(&fw, (const char *)fw_name,
drm_dev->dev); drm_dev->dev);
if (ret < 0) if (ret < 0) {
*revoked_ksv_cnt = 0;
*revoked_ksv_list = NULL;
ret = 0;
goto exit; goto exit;
}
if (fw->size && fw->data) if (fw->size && fw->data)
ret = drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list, ret = drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
...@@ -287,6 +291,8 @@ int drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs, ...@@ -287,6 +291,8 @@ int drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs,
ret = drm_hdcp_request_srm(drm_dev, &revoked_ksv_list, ret = drm_hdcp_request_srm(drm_dev, &revoked_ksv_list,
&revoked_ksv_cnt); &revoked_ksv_cnt);
if (ret)
return ret;
/* revoked_ksv_cnt will be zero when above function failed */ /* revoked_ksv_cnt will be zero when above function failed */
for (i = 0; i < revoked_ksv_cnt; i++) for (i = 0; i < revoked_ksv_cnt; i++)
......
...@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = { ...@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = {
{ .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info }, { .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info },
{ /* sentinel */ }, { /* sentinel */ },
}; };
MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);
static struct platform_driver ingenic_drm_driver = { static struct platform_driver ingenic_drm_driver = {
.driver = { .driver = {
......
...@@ -717,7 +717,7 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) ...@@ -717,7 +717,7 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder)
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode; struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder); struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder);
struct mipi_dsi_device *device = dsi->device; struct mipi_dsi_device *device = dsi->device;
union phy_configure_opts opts = { 0 }; union phy_configure_opts opts = { };
struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy; struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
u16 delay; u16 delay;
int err; int err;
......
...@@ -221,6 +221,7 @@ struct virtio_gpu_fpriv { ...@@ -221,6 +221,7 @@ struct virtio_gpu_fpriv {
/* virtio_ioctl.c */ /* virtio_ioctl.c */
#define DRM_VIRTIO_NUM_IOCTLS 10 #define DRM_VIRTIO_NUM_IOCTLS 10
extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS]; extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS];
void virtio_gpu_create_context(struct drm_device *dev, struct drm_file *file);
/* virtio_kms.c */ /* virtio_kms.c */
int virtio_gpu_init(struct drm_device *dev); int virtio_gpu_init(struct drm_device *dev);
......
...@@ -39,6 +39,9 @@ int virtio_gpu_gem_create(struct drm_file *file, ...@@ -39,6 +39,9 @@ int virtio_gpu_gem_create(struct drm_file *file,
int ret; int ret;
u32 handle; u32 handle;
if (vgdev->has_virgl_3d)
virtio_gpu_create_context(dev, file);
ret = virtio_gpu_object_create(vgdev, params, &obj, NULL); ret = virtio_gpu_object_create(vgdev, params, &obj, NULL);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
#include "virtgpu_drv.h" #include "virtgpu_drv.h"
static void virtio_gpu_create_context(struct drm_device *dev, void virtio_gpu_create_context(struct drm_device *dev, struct drm_file *file)
struct drm_file *file)
{ {
struct virtio_gpu_device *vgdev = dev->dev_private; struct virtio_gpu_device *vgdev = dev->dev_private;
struct virtio_gpu_fpriv *vfpriv = file->driver_priv; struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
......
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