rpms/kernel/devel linux-2.6-drm-i915-modeset.patch,1.3,1.4

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Tue Mar 11 06:52:22 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29642

Modified Files:
	linux-2.6-drm-i915-modeset.patch 
Log Message:
actually include the patch change


linux-2.6-drm-i915-modeset.patch:

Index: linux-2.6-drm-i915-modeset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-drm-i915-modeset.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-drm-i915-modeset.patch	11 Mar 2008 05:14:35 -0000	1.3
+++ linux-2.6-drm-i915-modeset.patch	11 Mar 2008 06:52:18 -0000	1.4
@@ -964,10 +964,10 @@
  }
 diff --git a/drivers/char/drm/drm_crtc.c b/drivers/char/drm/drm_crtc.c
 new file mode 100644
-index 0000000..1a4624c
+index 0000000..5d6a16a
 --- /dev/null
 +++ b/drivers/char/drm/drm_crtc.c
-@@ -0,0 +1,2449 @@
+@@ -0,0 +1,2451 @@
 +/*
 + * Copyright (c) 2006-2007 Intel Corporation
 + * Copyright (c) 2007 Dave Airlie <airlied at linux.ie>
@@ -2074,7 +2074,7 @@
 +	/* We should be able to check here if the fb has the same properties
 +	 * and then just flip_or_move it */
 +	if (crtc->fb != fb)
-+		changed = true;
++		flip_or_move = true;
 +
 +	if (crtc_info->x != crtc->x || crtc_info->y != crtc->y)
 +		flip_or_move = true;
@@ -2109,6 +2109,7 @@
 +		crtc->enabled = (new_mode != NULL);
 +		if (new_mode != NULL) {
 +			DRM_DEBUG("attempting to set mode from userspace\n");
++			drm_mode_debug_printmodeline(dev, &crtc->mode);
 +			drm_mode_debug_printmodeline(dev, new_mode);
 +			if (!drm_crtc_set_mode(crtc, new_mode, crtc_info->x,
 +					       crtc_info->y)) {
@@ -2125,6 +2126,7 @@
 +		}
 +		drm_disable_unused_functions(dev);
 +	} else if (flip_or_move) {
++		crtc->fb = fb;
 +		crtc->funcs->mode_set_base(crtc, crtc_info->x, crtc_info->y);
 +	}
 +
@@ -5620,7 +5622,7 @@
  EXPORT_SYMBOL(drm_i_have_hw_lock);
 diff --git a/drivers/char/drm/drm_modes.c b/drivers/char/drm/drm_modes.c
 new file mode 100644
-index 0000000..3763ca6
+index 0000000..8009cae
 --- /dev/null
 +++ b/drivers/char/drm/drm_modes.c
 @@ -0,0 +1,560 @@
@@ -5903,7 +5905,7 @@
 + */
 +bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2)
 +{
-+	if (mode1->clock == mode2->clock &&
++	if (/*mode1->clock == mode2->clock &&*/
 +	    mode1->hdisplay == mode2->hdisplay &&
 +	    mode1->hsync_start == mode2->hsync_start &&
 +	    mode1->hsync_end == mode2->hsync_end &&
@@ -8782,10 +8784,10 @@
  	int ret;
 diff --git a/drivers/char/drm/i915_init.c b/drivers/char/drm/i915_init.c
 new file mode 100644
-index 0000000..c59067a
+index 0000000..1234ac0
 --- /dev/null
 +++ b/drivers/char/drm/i915_init.c
-@@ -0,0 +1,409 @@
+@@ -0,0 +1,408 @@
 +/*
 + * Copyright (c) 2007 Intel Corporation
 + *   Jesse Barnes <jesse.barnes at intel.com>
@@ -9073,7 +9075,6 @@
 +	if (dev_priv->sarea_kmap.virtual) {
 +		drm_bo_kunmap(&dev_priv->sarea_kmap);
 +		dev_priv->sarea_kmap.virtual = NULL;
-+		dev->primary->master->lock.hw_lock = NULL;
 +		dev->sigdata.lock = NULL;
 +	}
 +
@@ -11282,10 +11283,10 @@
 +#endif /* __INTEL_DRV_H__ */
 diff --git a/drivers/char/drm/intel_fb.c b/drivers/char/drm/intel_fb.c
 new file mode 100644
-index 0000000..d9743da
+index 0000000..28cc324
 --- /dev/null
 +++ b/drivers/char/drm/intel_fb.c
-@@ -0,0 +1,752 @@
+@@ -0,0 +1,776 @@
 +/*
 + * Copyright © 2007 David Airlie
 + *
@@ -11516,6 +11517,8 @@
 +        struct drm_output *output = NULL;
 +        struct fb_var_screeninfo *var = &info->var;
 +	int found = 0;
++	int changed = 0;
++	int move_or_flip = 0;
 +
 +	DRM_DEBUG("\n");
 +
@@ -11598,11 +11601,25 @@
 +	}
 +
 +	/* re-attach fb */
-+	if (!par->crtc->fb)
++	if (par->crtc->fb != par->fb) {
 +		par->crtc->fb = par->fb;
++		move_or_flip = 1;
++	}
 +
-+	if (!drm_crtc_set_mode(par->crtc, drm_mode, var->xoffset, var->yoffset))
-+		return -EINVAL;
++	if (par->crtc->x != var->xoffset || par->crtc->y != var->yoffset)
++		move_or_flip = 1;
++
++	if (!drm_mode_equal(drm_mode, &par->crtc->mode))
++		changed = 1;
++
++	if (changed)
++		if (!drm_crtc_set_mode(par->crtc, drm_mode, var->xoffset, var->yoffset))
++			return -EINVAL;
++
++	if (move_or_flip) {
++		par->crtc->funcs->mode_set_base(par->crtc, var->xoffset, var->yoffset);
++	}
++		
 +
 +	return 0;
 +}
@@ -11757,16 +11774,23 @@
 +{
 +	struct intelfb_par *par = info->par;
 +	struct drm_crtc *crtc = par->crtc;
++	int changed = 0;
 +
 +	DRM_DEBUG("\n");
 +
 +	/* TODO add check size and pos*/
 +
 +	/* re-attach fb */
-+	if (!crtc->fb)
++	if (crtc->fb != par->fb) {
 +		crtc->fb = par->fb;
++		changed = 1;
++	}
++
++	if (par->crtc->x != var->xoffset || par->crtc->y != var->yoffset)
++		changed = 1;
 +
-+	drm_crtc_set_mode(crtc, &crtc->mode, var->xoffset, var->yoffset);
++	if (changed)
++		drm_crtc_set_mode(crtc, &crtc->mode, var->xoffset, var->yoffset);
 +
 +	info->var.xoffset = var->xoffset;
 +	info->var.yoffset = var->yoffset;
@@ -11825,6 +11849,7 @@
 +	info->var.pixclock = 10000000 / mode->htotal * 1000 / mode->vtotal * 100;
 +	/* avoid overflow */
 +	info->var.pixclock = info->var.pixclock * 1000 / mode->vrefresh;
++	info->var.pixclock = KHZ2PICOS(mode->clock);
 +
 +	return 0;
 +}




More information about the fedora-extras-commits mailing list