From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: rfc: breaking old userspace gamma for 10-bit support Date: Mon, 26 Jul 2010 10:26:07 -0700 Message-ID: <87lj8y40k0.fsf@pollan.anholt.net> References: <87pqyeklc3.fsf@pollan.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1087648202==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Andrew Lutomirski Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1087648202== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 23 Jul 2010 16:29:06 -0400, Andrew Lutomirski wrote: > On Fri, Jul 23, 2010 at 4:13 PM, Eric Anholt wrote: > > On Fri, 23 Jul 2010 14:00:30 -0400, Andrew Lutomirski wr= ote: > >> AFAICT intel hardware wants a 129-entry LUT when using high precision > >> gamma ramps. =C2=A0Rather than hacking some kind of decimation into the > >> kernel driver (and thus silently breaking DirectColor), I'd like to > >> teach userspace how to deal with variable gamma sizes. > >> > >> gnome-color-manager already more-or-less supports arbitrary gamma ramp > >> sizes (supposedly), dispwin ought to do it, and there might not be any > >> other software that really cares. =C2=A0gnome-screensaver saves and > >> restores the gamma ramp, and I haven't checked if it works right for > >> funny sizes. > >> > >> The worst problem we'll have is that current xf86-drv-intel can't > >> handle non-256 gamma sizes at all. =C2=A0So if we change the kernel we= 'll > >> break it completely. > >> > >> One option is to have the kernel report gamma_size =3D 129 but still > >> accept 256 and decimate itself. =C2=A0That might cause current userspa= ce to > >> keep working (except for DirectColor). > >> > >> Any thoughts? > > > > The kernel doesn't get to break old userspace. =C2=A0The kernel could s= upport > > new userspace that only asks for 129 slots and set a mode that has > > better precision in that case. =C2=A0New interfaces would probably be > > required to communicate that up front -- I haven't looked into it, but I > > just want to make sure you don't spend a bunch of time going down a path > > that will be rejected. > > >=20 > Does that include not breaking DirectColor? If we program the gamma > ramp to 129 slots, old userspace submits 256 entries that are not > monotonic, and we decimate the gamma ramp, we'll display the wrong > thing. I have no idea if there are any programs *at all* that do > that, though. (If they did, presumably they'd make the entire screen > look rather odd.) I don't really know. But if you want to change the userspace API, you need to explain why your change doesn't break existing users of the userspace API. That may mean figuring out what existing users actually do :) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxNxS8ACgkQHUdvYGzw6vdjDACfaPzT/PLRjkrXqQVKkdgRJJH+ B7gAn1/nCg7l1HYAqhK+62jaKqwQD54q =jt2v -----END PGP SIGNATURE----- --=-=-=-- --===============1087648202== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1087648202==--