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

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

Merge tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel into drm-next

Just flushing out my drm-misc branch, nothing major. Well too old patches
I've dug out from years since a patch from Rob look eerily familiar ;-)

* tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel:
  drm/probe-helper: clamp unknown connector status in the poll work
  drm/probe-helper: don't lose hotplug event
  next: drm/atomic: Use copy_from_user to copy 64 bit data from user space
  drm: Make drm_read() more robust against multithreaded races
  drm/fb-helper: Propagate errors from initial config failure
  drm: Drop superfluous "select VT_HW_CONSOLE_BINDING"
parents bdfcea4b b7703726
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -335,18 +335,27 @@ int ast_fbdev_init(struct drm_device *dev)

	ret = drm_fb_helper_init(dev, &afbdev->helper,
				 1, 1);
	if (ret) {
		kfree(afbdev);
		return ret;
	}
	if (ret)
		goto free;

	drm_fb_helper_single_add_all_connectors(&afbdev->helper);
	ret = drm_fb_helper_single_add_all_connectors(&afbdev->helper);
	if (ret)
		goto fini;

	/* disable all the possible outputs/crtcs before entering KMS mode */
	drm_helper_disable_unused_functions(dev);

	drm_fb_helper_initial_config(&afbdev->helper, 32);
	ret = drm_fb_helper_initial_config(&afbdev->helper, 32);
	if (ret)
		goto fini;

	return 0;

fini:
	drm_fb_helper_fini(&afbdev->helper);
free:
	kfree(afbdev);
	return ret;
}

void ast_fbdev_fini(struct drm_device *dev)
+12 −2
Original line number Diff line number Diff line
@@ -207,12 +207,22 @@ int bochs_fbdev_init(struct bochs_device *bochs)
	if (ret)
		return ret;

	drm_fb_helper_single_add_all_connectors(&bochs->fb.helper);
	ret = drm_fb_helper_single_add_all_connectors(&bochs->fb.helper);
	if (ret)
		goto fini;

	drm_helper_disable_unused_functions(bochs->dev);
	drm_fb_helper_initial_config(&bochs->fb.helper, 32);

	ret = drm_fb_helper_initial_config(&bochs->fb.helper, 32);
	if (ret)
		goto fini;

	bochs->fb.initialized = true;
	return 0;

fini:
	drm_fb_helper_fini(&bochs->fb.helper);
	return ret;
}

void bochs_fbdev_fini(struct bochs_device *bochs)
+6 −6
Original line number Diff line number Diff line
@@ -317,17 +317,17 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)

	ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper,
				 cdev->num_crtc, CIRRUSFB_CONN_LIMIT);
	if (ret) {
		kfree(gfbdev);
	if (ret)
		return ret;

	ret = drm_fb_helper_single_add_all_connectors(&gfbdev->helper);
	if (ret)
		return ret;
	}
	drm_fb_helper_single_add_all_connectors(&gfbdev->helper);

	/* disable all the possible outputs/crtcs before entering KMS mode */
	drm_helper_disable_unused_functions(cdev->dev);
	drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);

	return 0;
	return drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);
}

void cirrus_fbdev_fini(struct cirrus_device *cdev)
+3 −1
Original line number Diff line number Diff line
@@ -1259,7 +1259,9 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
				goto fail;
			}

			if (get_user(prop_value, prop_values_ptr + copied_props)) {
			if (copy_from_user(&prop_value,
					   prop_values_ptr + copied_props,
					   sizeof(prop_value))) {
				ret = -EFAULT;
				goto fail;
			}
+1 −1
Original line number Diff line number Diff line
@@ -1692,7 +1692,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper)
 * RETURNS:
 * Zero if everything went ok, nonzero otherwise.
 */
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
{
	struct drm_device *dev = fb_helper->dev;
	int count = 0;
Loading