<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Aug 29, 2018 at 10:42 AM Eric Engestrom <<a href="mailto:eric.engestrom@intel.com">eric.engestrom@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tuesday, 2018-08-28 21:44:54 -0500, Jason Ekstrand wrote:<br>
> On Tue, Aug 28, 2018 at 5:22 PM Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> wrote:<br>
> <br>
> > This effectively reverts a26693493570a9d0f0fba1be617e01ee7bfff4db which<br>
> > was a misguided attempt at protecting intel_query_dma_buf_modifiers from<br>
> > invalid formats. Unfortunately, in some internal EGL cases, we can get<br>
> > an SRGB format validly in this function. Rejecting such formats caused<br>
> > us to not allow CCS in some cases where we should have been allowing it.<br>
> ><br>
> > There's some question of whether or not we really should be using SRGB<br>
> > "fourcc" formats that aren't actually in drm_foucc.h but there's not<br>
> > much harm in allowing them through here.<br>
> ><br>
> > Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=107223" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=107223</a><br>
> > Fixes: a26693493570 "i965/screen: Return false for unsupported..."<br>
> > ---<br>
> > src/mesa/drivers/dri/i965/intel_screen.c | 14 +++++++++++---<br>
> > 1 file changed, 11 insertions(+), 3 deletions(-)<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c<br>
> > b/src/mesa/drivers/dri/i965/intel_screen.c<br>
> > index eaf5a3b9feb..ac1938f6204 100644<br>
> > --- a/src/mesa/drivers/dri/i965/intel_screen.c<br>
> > +++ b/src/mesa/drivers/dri/i965/intel_screen.c<br>
> > @@ -1274,9 +1274,9 @@ static bool<br>
> > intel_image_format_is_supported(const struct gen_device_info *devinfo,<br>
> > const struct intel_image_format *fmt)<br>
> > {<br>
> > - if (fmt->fourcc == __DRI_IMAGE_FOURCC_SARGB8888 ||<br>
> > - fmt->fourcc == __DRI_IMAGE_FOURCC_SABGR8888)<br>
> > - return false;<br>
> > + /* Currently, all formats with an intel_image_format are available on<br>
> > all<br>
> > + * platforms so there's really nothing to check there.<br>
> > + */<br>
> ><br>
> > #ifndef NDEBUG<br>
> > if (fmt->nplanes == 1) {<br>
> > @@ -1302,6 +1302,14 @@ intel_query_dma_buf_formats(__DRIscreen *_screen,<br>
> > int max,<br>
> > int num_formats = 0, i;<br>
> ><br>
> > for (i = 0; i < ARRAY_SIZE(intel_image_formats); i++) {<br>
> > + /* These two formats are valid DRI formats but do not exist in<br>
> > + * drm_fourcc.h in the Linux kernel. We don't want to accidentally<br>
> > + * advertise them through the EGL layer.<br>
> > + */<br>
> > + if (intel_image_formats[i].fourcc == __DRI_IMAGE_FOURCC_SARGB8888 ||<br>
> > + intel_image_formats[i].fourcc == __DRI_IMAGE_FOURCC_SABGR8888)<br>
> > + return false;<br>
> ><br>
> <br>
> This should be a continue. Fixed locally.<br>
<br>
With that, the series is<br>
Reviewed-by: Eric Engestrom <<a href="mailto:eric.engestrom@intel.com" target="_blank">eric.engestrom@intel.com</a>><br></blockquote><div><br></div><div>Thanks! <br></div></div></div>