Beispiel #1
0
static int intel_fbdev_set_par(struct fb_info *info)
{
    struct drm_fb_helper *fb_helper = info->par;
    struct intel_fbdev *ifbdev =
        container_of(fb_helper, struct intel_fbdev, helper);
    int ret;

    ret = drm_fb_helper_set_par(info);

    if (ret == 0) {
        /*
         * FIXME: fbdev presumes that all callbacks also work from
         * atomic contexts and relies on that for emergency oops
         * printing. KMS totally doesn't do that and the locking here is
         * by far not the only place this goes wrong.  Ignore this for
         * now until we solve this for real.
         */
        mutex_lock(&fb_helper->dev->struct_mutex);
        ret = i915_gem_object_set_to_gtt_domain(ifbdev->fb->obj,
                                                true);
        mutex_unlock(&fb_helper->dev->struct_mutex);
    }

    return ret;
}
Beispiel #2
0
static int intel_fbdev_set_par(struct fb_info *info)
{
	struct drm_fb_helper *fb_helper = info->par;
	struct intel_fbdev *ifbdev =
		container_of(fb_helper, struct intel_fbdev, helper);
	int ret;

	ret = drm_fb_helper_set_par(info);
	if (ret == 0)
		intel_fbdev_invalidate(ifbdev);

	return ret;
}
Beispiel #3
0
static int intel_fbdev_set_par(struct fb_info *info)
{
	struct drm_fb_helper *fb_helper = info->par;
	struct intel_fbdev *ifbdev =
		container_of(fb_helper, struct intel_fbdev, helper);
	int ret;

	ret = drm_fb_helper_set_par(info);

	if (ret == 0) {
		mutex_lock(&fb_helper->dev->struct_mutex);
		intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
		mutex_unlock(&fb_helper->dev->struct_mutex);
	}

	return ret;
}
Beispiel #4
0
/**
 * radeon_fb_helper_set_par - Hide cursor on CRTCs used by fbdev.
 *
 * @info: fbdev info
 *
 * This function hides the cursor on all CRTCs used by fbdev.
 */
static int radeon_fb_helper_set_par(struct fb_info *info)
{
	int ret;

	ret = drm_fb_helper_set_par(info);

	/* XXX: with universal plane support fbdev will automatically disable
	 * all non-primary planes (including the cursor)
	 */
	if (ret == 0) {
		struct drm_fb_helper *fb_helper = info->par;
		int i;

		for (i = 0; i < fb_helper->crtc_count; i++) {
			struct drm_crtc *crtc = fb_helper->crtc_info[i].mode_set.crtc;

			radeon_crtc_cursor_set2(crtc, NULL, 0, 0, 0, 0, 0);
		}
	}

	return ret;
}