Skip to content

Commit a9fe6f1

Browse files
committed
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: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents c61b0b9 + 5fe89a6 commit a9fe6f1

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

drivers/gpu/drm/drm_hdcp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,12 @@ static int drm_hdcp_request_srm(struct drm_device *drm_dev,
241241

242242
ret = request_firmware_direct(&fw, (const char *)fw_name,
243243
drm_dev->dev);
244-
if (ret < 0)
244+
if (ret < 0) {
245+
*revoked_ksv_cnt = 0;
246+
*revoked_ksv_list = NULL;
247+
ret = 0;
245248
goto exit;
249+
}
246250

247251
if (fw->size && fw->data)
248252
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,
287291

288292
ret = drm_hdcp_request_srm(drm_dev, &revoked_ksv_list,
289293
&revoked_ksv_cnt);
294+
if (ret)
295+
return ret;
290296

291297
/* revoked_ksv_cnt will be zero when above function failed */
292298
for (i = 0; i < revoked_ksv_cnt; i++)

drivers/gpu/drm/ingenic/ingenic-drm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ static const struct of_device_id ingenic_drm_of_match[] = {
843843
{ .compatible = "ingenic,jz4770-lcd", .data = &jz4770_soc_info },
844844
{ /* sentinel */ },
845845
};
846+
MODULE_DEVICE_TABLE(of, ingenic_drm_of_match);
846847

847848
static struct platform_driver ingenic_drm_driver = {
848849
.driver = {

drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder)
717717
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
718718
struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder);
719719
struct mipi_dsi_device *device = dsi->device;
720-
union phy_configure_opts opts = { 0 };
720+
union phy_configure_opts opts = { };
721721
struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
722722
u16 delay;
723723
int err;

drivers/gpu/drm/virtio/virtgpu_drv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ struct virtio_gpu_fpriv {
221221
/* virtio_ioctl.c */
222222
#define DRM_VIRTIO_NUM_IOCTLS 10
223223
extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS];
224+
void virtio_gpu_create_context(struct drm_device *dev, struct drm_file *file);
224225

225226
/* virtio_kms.c */
226227
int virtio_gpu_init(struct drm_device *dev);

drivers/gpu/drm/virtio/virtgpu_gem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ int virtio_gpu_gem_create(struct drm_file *file,
3939
int ret;
4040
u32 handle;
4141

42+
if (vgdev->has_virgl_3d)
43+
virtio_gpu_create_context(dev, file);
44+
4245
ret = virtio_gpu_object_create(vgdev, params, &obj, NULL);
4346
if (ret < 0)
4447
return ret;

drivers/gpu/drm/virtio/virtgpu_ioctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434

3535
#include "virtgpu_drv.h"
3636

37-
static void virtio_gpu_create_context(struct drm_device *dev,
38-
struct drm_file *file)
37+
void virtio_gpu_create_context(struct drm_device *dev, struct drm_file *file)
3938
{
4039
struct virtio_gpu_device *vgdev = dev->dev_private;
4140
struct virtio_gpu_fpriv *vfpriv = file->driver_priv;

0 commit comments

Comments
 (0)