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

Commit e470f3a2 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'topic/drm-misc-2016-07-28' of git://anongit.freedesktop.org/drm-intel into drm-next

A few more simple fixes that Sean&I collected. There's a bunch of bigger
things on dri-devel, but I think those are all too late for 4.8 really.
I'll try and go collect them after -rc1 for 4.9.

* tag 'topic/drm-misc-2016-07-28' of git://anongit.freedesktop.org/drm-intel:
  drm/arm: mali-dp: Fix error return code in malidp_bind()
  drm/arm: mali-dp: Remove redundant dev_err call in malidp_bind()
  drm/gma500: remove unnecessary stub for fb_ioctl()
  apple-gmux: Sphinxify docs
  drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint
  drm/sti: use new Reset API
  drm/etnaviv: Optimize error handling in etnaviv_gem_new_userptr()
  drm/etnaviv: Delete unnecessary checks before two function calls
  drm/vmwgfx: Delete an unnecessary check before the function call "vfree"
  drm/qxl: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
  drm/mgag200: Delete an unnecessary check before drm_gem_object_unreference_unlocked()
  drm/bridge: ps8622: Delete an unnecessary check before backlight_device_unregister()
  GPU-DRM-GMA500: Delete unnecessary checks before two function calls
  GPU-DRM-OMAP: Delete unnecessary checks before two function calls
parents a1f5524a 12ae57aa
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ static int malidp_bind(struct device *dev)
{
	struct resource *res;
	struct drm_device *drm;
	struct device_node *ep;
	struct malidp_drm *malidp;
	struct malidp_hw_device *hwdev;
	struct platform_device *pdev = to_platform_device(dev);
@@ -284,10 +285,8 @@ static int malidp_bind(struct device *dev)

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	hwdev->regs = devm_ioremap_resource(dev, res);
	if (IS_ERR(hwdev->regs)) {
		DRM_ERROR("Failed to map control registers area\n");
	if (IS_ERR(hwdev->regs))
		return PTR_ERR(hwdev->regs);
	}

	hwdev->pclk = devm_clk_get(dev, "pclk");
	if (IS_ERR(hwdev->pclk))
@@ -360,11 +359,14 @@ static int malidp_bind(struct device *dev)
		goto register_fail;

	/* Set the CRTC's port so that the encoder component can find it */
	malidp->crtc.port = of_graph_get_next_endpoint(dev->of_node, NULL);
	ep = of_graph_get_next_endpoint(dev->of_node, NULL);
	if (!ep) {
		ret = -EINVAL;
		goto port_fail;
	}
	malidp->crtc.port = of_get_next_parent(ep);

	ret = component_bind_all(dev, drm);
	of_node_put(malidp->crtc.port);

	if (ret) {
		DRM_ERROR("Failed to bind all components\n");
		goto bind_fail;
@@ -402,6 +404,9 @@ static int malidp_bind(struct device *dev)
irq_init_fail:
	component_unbind_all(dev, drm);
bind_fail:
	of_node_put(malidp->crtc.port);
	malidp->crtc.port = NULL;
port_fail:
	drm_dev_unregister(drm);
register_fail:
	malidp_de_planes_destroy(drm);
@@ -435,6 +440,8 @@ static void malidp_unbind(struct device *dev)
	malidp_de_irq_fini(drm);
	drm_vblank_cleanup(drm);
	component_unbind_all(dev, drm);
	of_node_put(malidp->crtc.port);
	malidp->crtc.port = NULL;
	drm_dev_unregister(drm);
	malidp_de_planes_destroy(drm);
	drm_mode_config_cleanup(drm);
+1 −3
Original line number Diff line number Diff line
@@ -636,9 +636,7 @@ static int ps8622_remove(struct i2c_client *client)
{
	struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);

	if (ps8622->bl)
	backlight_device_unregister(ps8622->bl);

	drm_bridge_remove(&ps8622->bridge);

	return 0;
+5 −11
Original line number Diff line number Diff line
@@ -535,7 +535,6 @@ void etnaviv_gem_describe_objects(struct etnaviv_drm_private *priv,

static void etnaviv_gem_shmem_release(struct etnaviv_gem_object *etnaviv_obj)
{
	if (etnaviv_obj->vaddr)
	vunmap(etnaviv_obj->vaddr);
	put_pages(etnaviv_obj);
}
@@ -670,9 +669,7 @@ static struct drm_gem_object *__etnaviv_gem_new(struct drm_device *dev,
	return obj;

fail:
	if (obj)
	drm_gem_object_unreference_unlocked(obj);

	return ERR_PTR(ret);
}

@@ -916,15 +913,12 @@ int etnaviv_gem_new_userptr(struct drm_device *dev, struct drm_file *file,
	get_task_struct(current);

	ret = etnaviv_gem_obj_add(dev, &etnaviv_obj->base);
	if (ret) {
		drm_gem_object_unreference_unlocked(&etnaviv_obj->base);
		return ret;
	}
	if (ret)
		goto unreference;

	ret = drm_gem_handle_create(file, &etnaviv_obj->base, handle);

unreference:
	/* drop reference from allocate - handle holds it now */
	drm_gem_object_unreference_unlocked(&etnaviv_obj->base);

	return ret;
}
+1 −2
Original line number Diff line number Diff line
@@ -246,7 +246,6 @@ static void cdv_hdmi_destroy(struct drm_connector *connector)
{
	struct gma_encoder *gma_encoder = gma_attached_encoder(connector);

	if (gma_encoder->i2c_bus)
	psb_intel_i2c_destroy(gma_encoder->i2c_bus);
	drm_connector_unregister(connector);
	drm_connector_cleanup(connector);
+3 −6
Original line number Diff line number Diff line
@@ -444,7 +444,6 @@ static void cdv_intel_lvds_destroy(struct drm_connector *connector)
{
	struct gma_encoder *gma_encoder = gma_attached_encoder(connector);

	if (gma_encoder->i2c_bus)
	psb_intel_i2c_destroy(gma_encoder->i2c_bus);
	drm_connector_unregister(connector);
	drm_connector_cleanup(connector);
@@ -780,11 +779,9 @@ void cdv_intel_lvds_init(struct drm_device *dev,
failed_find:
	mutex_unlock(&dev->mode_config.mutex);
	printk(KERN_ERR "Failed find\n");
	if (gma_encoder->ddc_bus)
	psb_intel_i2c_destroy(gma_encoder->ddc_bus);
failed_ddc:
	printk(KERN_ERR "Failed DDC\n");
	if (gma_encoder->i2c_bus)
	psb_intel_i2c_destroy(gma_encoder->i2c_bus);
failed_blc_i2c:
	printk(KERN_ERR "Failed BLC\n");
Loading