Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44ef02c2 authored by Dave Airlie's avatar Dave Airlie
Browse files

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

atomic: Clear state pointers on clear (Ville)
vc4: Fix oops in dpi disable (Eric)
omap: Various error-checking + uninitialized var fixes (Tomi)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>

* tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc:
  drm/vc4: Fix scaling of uni-planar formats
  drm/bridge/sii8620: add Kconfig dependency on extcon
  drm/omap: handle alloc failures in omap_connector
  drm/omap: add missing linefeeds to prints
  drm/omap: handle error if scale coefs are not found
  drm/omap: check return value from soc_device_match
  drm/omap: fix possible NULL ref issue in tiler_reserve_2d
  drm/omap: fix uninitialized ret variable
  drm/omap: silence unititialized variable warning
  drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge.
  drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear()
  drm/atomic: Clean old_state/new_state in drm_atomic_state_default_clear()
parents 03a0a3e5 9a0e9802
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ config DRM_SIL_SII8620
	tristate "Silicon Image SII8620 HDMI/MHL bridge"
	depends on OF && RC_CORE
	select DRM_KMS_HELPER
	imply EXTCON
	help
	  Silicon Image SII8620 HDMI/MHL bridge chip driver.

+8 −0
Original line number Diff line number Diff line
@@ -155,6 +155,8 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)
						       state->connectors[i].state);
		state->connectors[i].ptr = NULL;
		state->connectors[i].state = NULL;
		state->connectors[i].old_state = NULL;
		state->connectors[i].new_state = NULL;
		drm_connector_put(connector);
	}

@@ -169,6 +171,8 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)

		state->crtcs[i].ptr = NULL;
		state->crtcs[i].state = NULL;
		state->crtcs[i].old_state = NULL;
		state->crtcs[i].new_state = NULL;
	}

	for (i = 0; i < config->num_total_plane; i++) {
@@ -181,6 +185,8 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)
						   state->planes[i].state);
		state->planes[i].ptr = NULL;
		state->planes[i].state = NULL;
		state->planes[i].old_state = NULL;
		state->planes[i].new_state = NULL;
	}

	for (i = 0; i < state->num_private_objs; i++) {
@@ -190,6 +196,8 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state)
						 state->private_objs[i].state);
		state->private_objs[i].ptr = NULL;
		state->private_objs[i].state = NULL;
		state->private_objs[i].old_state = NULL;
		state->private_objs[i].new_state = NULL;
	}
	state->num_private_objs = 0;

+13 −7
Original line number Diff line number Diff line
@@ -828,6 +828,12 @@ static void dispc_ovl_set_scale_coef(struct dispc_device *dispc,
	h_coef = dispc_ovl_get_scale_coef(fir_hinc, true);
	v_coef = dispc_ovl_get_scale_coef(fir_vinc, five_taps);

	if (!h_coef || !v_coef) {
		dev_err(&dispc->pdev->dev, "%s: failed to find scale coefs\n",
			__func__);
		return;
	}

	for (i = 0; i < 8; i++) {
		u32 h, hv;

@@ -2342,7 +2348,7 @@ static int dispc_ovl_calc_scaling_24xx(struct dispc_device *dispc,
	}

	if (in_width > maxsinglelinewidth) {
		DSSERR("Cannot scale max input width exceeded");
		DSSERR("Cannot scale max input width exceeded\n");
		return -EINVAL;
	}
	return 0;
@@ -2424,13 +2430,13 @@ static int dispc_ovl_calc_scaling_34xx(struct dispc_device *dispc,
	}

	if (in_width > (maxsinglelinewidth * 2)) {
		DSSERR("Cannot setup scaling");
		DSSERR("width exceeds maximum width possible");
		DSSERR("Cannot setup scaling\n");
		DSSERR("width exceeds maximum width possible\n");
		return -EINVAL;
	}

	if (in_width > maxsinglelinewidth && *five_taps) {
		DSSERR("cannot setup scaling with five taps");
		DSSERR("cannot setup scaling with five taps\n");
		return -EINVAL;
	}
	return 0;
@@ -2472,7 +2478,7 @@ static int dispc_ovl_calc_scaling_44xx(struct dispc_device *dispc,
			in_width > maxsinglelinewidth && ++*decim_x);

	if (in_width > maxsinglelinewidth) {
		DSSERR("Cannot scale width exceeds max line width");
		DSSERR("Cannot scale width exceeds max line width\n");
		return -EINVAL;
	}

@@ -2490,7 +2496,7 @@ static int dispc_ovl_calc_scaling_44xx(struct dispc_device *dispc,
		 * bandwidth. Despite what theory says this appears to
		 * be true also for 16-bit color formats.
		 */
		DSSERR("Not enough bandwidth, too much downscaling (x-decimation factor %d > 4)", *decim_x);
		DSSERR("Not enough bandwidth, too much downscaling (x-decimation factor %d > 4)\n", *decim_x);

		return -EINVAL;
	}
@@ -4633,7 +4639,7 @@ static int dispc_errata_i734_wa_init(struct dispc_device *dispc)
						i734_buf.size, &i734_buf.paddr,
						GFP_KERNEL);
	if (!i734_buf.vaddr) {
		dev_err(&dispc->pdev->dev, "%s: dma_alloc_writecombine failed",
		dev_err(&dispc->pdev->dev, "%s: dma_alloc_writecombine failed\n",
			__func__);
		return -ENOMEM;
	}
+1 −1
Original line number Diff line number Diff line
@@ -679,7 +679,7 @@ static int hdmi_audio_config(struct device *dev,
			     struct omap_dss_audio *dss_audio)
{
	struct omap_hdmi *hd = dev_get_drvdata(dev);
	int ret;
	int ret = 0;

	mutex_lock(&hd->lock);

+6 −1
Original line number Diff line number Diff line
@@ -922,8 +922,13 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
{
	const struct hdmi4_features *features;
	struct resource *res;
	const struct soc_device_attribute *soc;

	features = soc_device_match(hdmi4_soc_devices)->data;
	soc = soc_device_match(hdmi4_soc_devices);
	if (!soc)
		return -ENODEV;

	features = soc->data;
	core->cts_swmode = features->cts_swmode;
	core->audio_use_mclk = features->audio_use_mclk;

Loading