From e76b08cad2770015346fd4cd757de3bb3b6ff37c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 15 Oct 2013 12:46:09 +0100 Subject: [PATCH] sna: Disable updating properties upon reading their values When we assign the hardware values to the output properties, we do not need to process the set_property callback to write those values back to hardware. This callback is triggered by the pending update flag passed to RRChangeOutputProperty. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70406 Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 31d1ceb6..f74adf43 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1965,7 +1965,7 @@ sna_output_attach_edid(xf86OutputPtr output) XA_INTEGER, 8, PropModeReplace, sna_output->edid_len, sna_output->edid_raw, - FALSE, TRUE); + FALSE, FALSE); return; } @@ -2271,8 +2271,8 @@ sna_output_create_ranged_atom(xf86OutputPtr output, Atom *atom, "RRConfigureOutputProperty error, %d\n", err); err = RRChangeOutputProperty(output->randr_output, *atom, XA_INTEGER, - 32, PropModeReplace, 1, &value, FALSE, - TRUE); + 32, PropModeReplace, 1, &value, + FALSE, FALSE); if (err != 0) xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); @@ -2344,7 +2344,8 @@ sna_output_create_resources(xf86OutputPtr output) break; /* there's always a matching value */ err = RRChangeOutputProperty(output->randr_output, p->atoms[0], - XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j+1], FALSE, TRUE); + XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j+1], + FALSE, FALSE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); @@ -2473,7 +2474,7 @@ sna_output_get_property(xf86OutputPtr output, Atom property) err = RRChangeOutputProperty(output->randr_output, property, XA_INTEGER, 32, PropModeReplace, 1, &val, - FALSE, TRUE); + FALSE, FALSE); sna_output->backlight_active_level = old_backlight;