<div dir="ltr"><div><div><div><div>Hi Christian,<br><br></div>I pushed it before already.  I can try to add a git notes if you want.<br></div>In any case thx for the review.<br><br></div>Cheers<br></div>Julien<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 October 2016 at 10:09, Christian König <span dir="ltr"><<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="m_1892179856569540209moz-cite-prefix">Am 17.10.2016 um 21:40 schrieb Julien
      Isorce:<br>
    </div>
    <blockquote type="cite">
      
      <br>
      <br>
      On Monday, 17 October 2016, Mark Thompson <<a href="mailto:sw@jkqxz.net" target="_blank">sw@jkqxz.net</a>>
      wrote:<br>
      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 17/10/16
        17:33, Julien Isorce wrote:<br>
        > As specified in va.h, default value should be set on
        attributes<br>
        > not present in the input list.<br>
        ><br>
        > Signed-off-by: Julien Isorce <<a>j.isorce@samsung.com</a>><br>
        > ---<br>
        >  src/gallium/state_trackers/va/<wbr>config.c  | 9 +++++++++<br>
        >  src/gallium/state_trackers/va/<wbr>surface.c | 5 +++--<br>
        >  2 files changed, 12 insertions(+), 2 deletions(-)<br>
        ><br>
        > diff --git a/src/gallium/state_trackers/v<wbr>a/config.c
        b/src/gallium/state_trackers/v<wbr>a/config.c<br>
        > index 2f96eb6..fb236f1 100644<br>
        > --- a/src/gallium/state_trackers/v<wbr>a/config.c<br>
        > +++ b/src/gallium/state_trackers/v<wbr>a/config.c<br>
        > @@ -195,6 +195,11 @@ vlVaCreateConfig(VADriverConte<wbr>xtP
        ctx, VAProfile profile, VAEntrypoint entrypoin<br>
        >              }<br>
        >           }<br>
        >        }<br>
        > +<br>
        > +      /* Default value if not specified in the input
        attributes. */<br>
        > +      if (!config->rt_format)<br>
        > +        config->rt_format = VA_RT_FORMAT_YUV420 |
        VA_RT_FORMAT_RGB32;<br>
        <br>
        Indent should be three spaces.<br>
        <br>
        > +<br>
        >        pipe_mutex_lock(drv->mutex);<br>
        >        *config_id = handle_table_add(drv->htab, config);<br>
        >        pipe_mutex_unlock(drv->mutex);<br>
        > @@ -256,6 +261,10 @@ vlVaCreateConfig(VADriverConte<wbr>xtP
        ctx, VAProfile profile, VAEntrypoint entrypoin<br>
        >        }<br>
        >     }<br>
        ><br>
        > +   /* Default value if not specified in the input
        attributes. */<br>
        > +   if (!config->rt_format)<br>
        > +     config->rt_format = VA_RT_FORMAT_YUV420;<br>
        <br>
        And here.</blockquote>
      <div><br>
      </div>
      <div>Oh I forgot :) , cheers.</div>
      <div><br>
      </div>
      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <br>
        > +<br>
        >     pipe_mutex_lock(drv->mutex);<br>
        >     *config_id = handle_table_add(drv->htab, config);<br>
        >     pipe_mutex_unlock(drv->mutex)<wbr>;<br>
        > diff --git a/src/gallium/state_trackers/v<wbr>a/surface.c
        b/src/gallium/state_trackers/v<wbr>a/surface.c<br>
        > index 5e92980..f8513d9 100644<br>
        > --- a/src/gallium/state_trackers/v<wbr>a/surface.c<br>
        > +++ b/src/gallium/state_trackers/v<wbr>a/surface.c<br>
        > @@ -419,7 +419,7 @@ vlVaQuerySurfaceAttributes(VAD<wbr>riverContextP
        ctx, VAConfigID config_id,<br>
        >     /* vlVaCreateConfig returns PIPE_VIDEO_PROFILE_UNKNOWN<br>
        >      * only for VAEntrypointVideoProc. */<br>
        >     if (config->profile == PIPE_VIDEO_PROFILE_UNKNOWN) {<br>
        > -      if (config->rt_format == VA_RT_FORMAT_RGB32) {<br>
        > +      if (config->rt_format & VA_RT_FORMAT_RGB32) {<br>
        >           for (j = 0; j < ARRAY_SIZE(vpp_surface_formats<wbr>);
        ++j) {<br>
        >              attribs[i].type = VASurfaceAttribPixelFormat;<br>
        >              attribs[i].value.type =
        VAGenericValueTypeInteger;<br>
        > @@ -427,7 +427,8 @@ vlVaQuerySurfaceAttributes(VAD<wbr>riverContextP
        ctx, VAConfigID config_id,<br>
        >              attribs[i].value.value.i =
        PipeFormatToVaFourcc(vpp_surfa<wbr>ce_formats[j]);<br>
        >              i++;<br>
        >           }<br>
        > -      } else if (config->rt_format ==
        VA_RT_FORMAT_YUV420) {<br>
        > +      }<br>
        > +      if (config->rt_format & VA_RT_FORMAT_YUV420)
        {<br>
        >           attribs[i].type = VASurfaceAttribPixelFormat;<br>
        >           attribs[i].value.type =
        VAGenericValueTypeInteger;<br>
        >           attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE |
        VA_SURFACE_ATTRIB_SETTABLE;<br>
        ><br>
        <br>
        Actual code LGTM, and tested.<br>
        <br>
        Reviewed-by: Mark Thompson <<a>sw@jkqxz.net</a>></blockquote>
      <div><br>
      </div>
      <div>Thx, will push it soon.</div>
    </blockquote>
    <br>
    If you haven't already pushed it with the fixes Mark mentioned the
    patch is Reviewed-by: Christian König
    <a class="m_1892179856569540209moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com" target="_blank"><christian.koenig@amd.com></a> as well.<br>
    <br>
    Regards,<br>
    Christian.<br>
    <br>
    <blockquote type="cite">
      <div>Julien</div>
      <div> </div>
      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <br>
        Thanks,<br>
        <br>
        - Mark<br>
        <br>
        ______________________________<wbr>_________________<br>
        mesa-dev mailing list<br>
        <a>mesa-dev@lists.freedesktop.org</a><br>
        <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
      </blockquote>
    </blockquote>
    <p><br>
    </p>
  </div>

</blockquote></div><br></div>