xf86-video-intel: 2 commits - src/intel_display.c uxa/uxa-glyphs.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Aug 25 07:02:05 PDT 2010


 src/intel_display.c |   55 +++++++++-------------------------------------------
 uxa/uxa-glyphs.c    |   10 +++------
 2 files changed, 14 insertions(+), 51 deletions(-)

New commits:
commit 68a5ad497b557ab9e8bff301098ea78c84d385a2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Aug 25 14:59:04 2010 +0100

    uxa: Fallback if faced with large A1 glyphs.
    
    Rather than assert, we should fixup the use of large A1 glyphs. However,
    the simplest approach is to simply fallback to s/w.
    
    Fixes:
    
      Bug 29430 - [UXA] Crash due assert (uxa_pixmap_is_offscreen(src_pixmap));
      https://bugs.freedesktop.org/show_bug.cgi?id=29430
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 68d1c22..8c00e90 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -780,9 +780,8 @@ uxa_glyphs_to_dst(CARD8 op,
 
 				mask_pixmap =
 					uxa_get_drawable_pixmap(this_atlas->pDrawable);
-				assert (uxa_pixmap_is_offscreen(mask_pixmap));
-
-				if (!uxa_screen->info->prepare_composite(op,
+				if (!uxa_pixmap_is_offscreen(mask_pixmap) ||
+				    !uxa_screen->info->prepare_composite(op,
 									 localSrc, this_atlas, pDst,
 									 src_pixmap, mask_pixmap, dst_pixmap))
 					return -1;
@@ -983,9 +982,8 @@ uxa_glyphs_via_mask(CARD8 op,
 
 				src_pixmap =
 					uxa_get_drawable_pixmap(this_atlas->pDrawable);
-				assert (uxa_pixmap_is_offscreen(src_pixmap));
-
-				if (!uxa_screen->info->prepare_composite(PictOpAdd,
+				if (!uxa_pixmap_is_offscreen(src_pixmap) ||
+				    !uxa_screen->info->prepare_composite(PictOpAdd,
 									 this_atlas, NULL, mask,
 									 src_pixmap, NULL, pixmap))
 					return -1;
commit 9c3e34703dcdc2155faeb2c1886930def19d9989
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 22 21:27:45 2010 +0100

    Leave adjustment of backlight to the driver.

diff --git a/src/intel_display.c b/src/intel_display.c
index 4da2790..c945104 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -80,6 +80,7 @@ struct intel_property {
 struct intel_output {
 	struct intel_mode *mode;
 	int output_id;
+	int dpms_id;
 	drmModeConnectorPtr mode_output;
 	drmModeEncoderPtr mode_encoder;
 	int num_props;
@@ -861,56 +862,16 @@ intel_output_destroy(xf86OutputPtr output)
 }
 
 static void
-intel_output_dpms_backlight(xf86OutputPtr output, int oldmode, int mode)
-{
-	struct intel_output *intel_output = output->driver_private;
-
-	if (!intel_output->backlight_iface)
-		return;
-
-	if (mode == DPMSModeOn) {
-		/* If we're going from off->on we may need to turn on the backlight. */
-		if (oldmode != DPMSModeOn)
-			intel_output_backlight_set(output,
-						   intel_output->backlight_active_level);
-	} else {
-		/* Only save the current backlight value if we're going from on to off. */
-		if (oldmode == DPMSModeOn)
-			intel_output->backlight_active_level = intel_output_backlight_get(output);
-		intel_output_backlight_set(output, 0);
-	}
-}
-
-static void
 intel_output_dpms(xf86OutputPtr output, int dpms)
 {
 	struct intel_output *intel_output = output->driver_private;
-	drmModeConnectorPtr koutput = intel_output->mode_output;
 	struct intel_mode *mode = intel_output->mode;
-	int i;
 
-	for (i = 0; i < koutput->count_props; i++) {
-		drmModePropertyPtr props;
-
-		props = drmModeGetProperty(mode->fd, koutput->props[i]);
-		if (!props)
-			continue;
-
-		if (!strcmp(props->name, "DPMS")) {
-			drmModeConnectorSetProperty(mode->fd,
-						    intel_output->output_id,
-						    props->prop_id,
-						    dpms);
-			intel_output_dpms_backlight(output,
-						      intel_output->dpms_mode,
-						      dpms);
-			intel_output->dpms_mode = dpms;
-			drmModeFreeProperty(props);
-			return;
-		}
-
-		drmModeFreeProperty(props);
-	}
+	drmModeConnectorSetProperty(mode->fd,
+				    intel_output->output_id,
+				    intel_output->dpms_id,
+				    dpms);
+	intel_output->dpms_mode = dpms;
 }
 
 int
@@ -961,6 +922,10 @@ intel_output_create_resources(xf86OutputPtr output)
 
 		drmmode_prop = drmModeGetProperty(mode->fd,
 						  mode_output->props[i]);
+
+		if (!strcmp(drmmode_prop->name, "DPMS"))
+			intel_output->dpms_id = drmmode_prop->prop_id;
+
 		if (intel_property_ignore(drmmode_prop)) {
 			drmModeFreeProperty(drmmode_prop);
 			continue;


More information about the xorg-commit mailing list