Bladeren bron

Merge branch 'for19.05.00' of ssh://bitbucket.itg.ti.com/~a0869644/ti-linux-kernel into audio_display-ti-linux-4.19.y

2019.05 Fixes

* 'for19.05.00' of ssh://bitbucket.itg.ti.com/~a0869644/ti-linux-kernel:
  drm/tidss: WB: fix error reporting in tidss_wb_init
  drm/tidss: WB: remove unnecessary kernel trace
  media: i2c: ov5640: fix potential null pointer dereference
Jyri Sarha 6 jaren geleden
bovenliggende
commit
912ce97682

+ 4 - 13
drivers/gpu/drm/tidss/tidss_dispc7.c

@@ -2829,10 +2829,9 @@ no_cfg:
 	return 0;
 }
 
-static int dispc7_wb_find_free_ovr(struct dispc_device *dispc)
+static void dispc7_wb_find_free_ovr(struct dispc_device *dispc)
 {
 	struct tidss_device *tidss = dispc->tidss;
-	struct device *dev = tidss->dev;
 	int i, j;
 	bool found;
 	u32 ovr_id = 0xff;
@@ -2855,18 +2854,10 @@ static int dispc7_wb_find_free_ovr(struct dispc_device *dispc)
 		}
 	}
 
-	if (ovr_id != 0xff) {
+	if (ovr_id != 0xff)
 		dispc->wb_reserved_ovr = ovr_id;
-
-		dev_info(dev, "%s: found ovr %s (%d)\n", __func__,
-			 tidss->dispc_ops->vp_name(tidss->dispc, ovr_id), ovr_id);
-
-		return 0;
-	}
-
-	dispc->wb_managed = false;
-	dev_warn(dev, "%s: No OVR available for WB, disabling WB.\n", __func__);
-	return -1;
+	else
+		dispc->wb_managed = false;
 }
 
 static u32 dispc7_wb_get_reserved_ovr(struct dispc_device *dispc)

+ 0 - 3
drivers/gpu/drm/tidss/tidss_plane.c

@@ -248,9 +248,6 @@ struct drm_plane *tidss_plane_reserve_wb(struct drm_device *dev)
 	int i;
 	u32 ovr_id = tidss->dispc_ops->wb_get_reserved_ovr(tidss->dispc);
 
-	dev_dbg(dev->dev, "%s: found ovr %s (%d)\n", __func__,
-		tidss->dispc_ops->vp_name(tidss->dispc, ovr_id), ovr_id);
-
 	for (i = tidss->num_planes - 1; i >= 0; --i) {
 		struct drm_plane *plane = tidss->planes[i];
 		struct tidss_plane *tplane = to_tidss_plane(plane);

+ 1 - 2
drivers/gpu/drm/tidss/tidss_wb.c

@@ -147,12 +147,11 @@ int tidss_wb_init(struct drm_device *drmdev)
 	ret = tidss_wbm2m_init(wdev);
 	if (ret) {
 		log_err(wdev, "Failed to initialize wb m2m\n");
+		return ret;
 	}
 
 	log_dbg(wdev, "WB loaded\n");
 	return 0;
-
-	return ret;
 }
 
 void tidss_wb_cleanup(struct drm_device *drmdev)

+ 1 - 1
drivers/media/i2c/ov5640.c

@@ -2588,7 +2588,6 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
 		v4l2_ctrl_new_std(hdl, ops,
 				  V4L2_CID_PIXEL_RATE, 0, INT_MAX, 1,
 				  55969920);
-	ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
 
 	/* Auto/manual white balance */
 	ctrls->auto_wb = v4l2_ctrl_new_std(hdl, ops,
@@ -2637,6 +2636,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
 		goto free_ctrls;
 	}
 
+	ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
 	ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
 	ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE;