<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 2/6/2012 2:23 PM, William Otten wrote:
    <blockquote cite="mid:4F3036D4.2050705@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 2/6/2012 10:56 AM, william otten wrote:
      <blockquote
cite="mid:CAHcDxgb-MYynWBGJBb1vosU84GEJko-yo4HGERxP9r=6vRJf2g@mail.gmail.com"
        type="cite"><br>
        <br>
        <div class="gmail_quote">On Sat, Feb 4, 2012 at 8:58 AM, William
          Otten <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:williammotten@gmail.com">williammotten@gmail.com</a>&gt;</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="im"> On 2/3/2012 9:59 PM, william otten wrote:
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite"><br>
                    <br>
                    <div class="gmail_quote">On Fri, Feb 3, 2012 at 4:01
                      PM, Matt Garman <span dir="ltr">&lt;<a
                          moz-do-not-send="true"
                          href="mailto:matthew.garman@gmail.com"
                          target="_blank">matthew.garman@gmail.com</a>&gt;</span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <p>Hi William,</p>
                        <p>The only way I know to verify the patch is in
                          place (other than by testing in myth using
                          opengl) is to look at the source. Look at that
                          function I mentioned in the earlier post, and
                          see if it includes the additional null pointer
                          check. Or, I suppose if you are already in
                          contact with the xorg devs, just ask them
                          directly.</p>
                        <p>I'm afraid I can't think of any other way to
                          check. Hope that helps!<span><font
                              color="#888888"><br>
                              Matt<br>
                            </font></span></p>
                        <div>
                          <div>
                            <div class="gmail_quote">On Feb 3, 2012 6:47
                              AM, "William Otten" &lt;<a
                                moz-do-not-send="true"
                                href="mailto:williammotten@gmail.com"
                                target="_blank">williammotten@gmail.com</a>&gt;


                              wrote:<br type="attribution">
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"> On
                                1/29/2012 7:34 PM, Matt Garman wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"> On Sat, Jan
                                  28, 2012 at 01:55:31PM -0600, william
                                  otten wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex"> The patch
                                    is quite simple and involves one
                                    function in<br>
mesa/drivers/dri/intel/intel_screen.c<br>
                                    Another person on this list<br>
                                    reported that the patch solved an
                                    identical crash for him. &nbsp;Before<br>
                                    diving into much debugging, I
                                    suggest you apply this patch to the
                                    mesa<br>
                                    7.11.2 code, recompile it, and give
                                    it a test.<br>
                                  </blockquote>
                                  I may be the "other person" who has
                                  been referred to several times<br>
                                  in this thread, as I did exactly that:
                                  I patched the intel_screen.c<br>
                                  file and rebuilt mesa, and now have a
                                  nicely working OpenGL-based<br>
                                  SNB frontend (which I'm proud to say
                                  is also quite small and<br>
                                  low-power :).<br>
                                  <br>
                                  &gt; From my skimming of this thread,
                                  it looks like the individual with<br>
                                  the patching issues is running Ubuntu.
                                  &nbsp;I'm running CentOS plus<br>
                                  ATrpms (for MythTV) and elrepo for
                                  newer Intel video drivers and<br>
                                  supporting packages (in particular,
                                  mesa).<br>
                                  <br>
                                  What I did was simply download the
                                  source RPM for mesa from elrepo,<br>
                                  manually hack the intel_screen.c file
                                  according to the patch, and<br>
                                  rebuild. &nbsp;I don't know how to do this
                                  with Ubuntu/debian packages,<br>
                                  but I can't imagine the process is
                                  dramatically different from an<br>
                                  RPM-based distro.<br>
                                  <br>
                                  FWIW, the patch that has been
                                  mentioned doesn't apply cleanly to the<br>
                                  mesa source from elrepo, because it's
                                  a slightly older version:<br>
                                  looks like the mesa-20111103 snapshot.<br>
                                  <br>
                                  But the patch is super simple. &nbsp;Just
                                  look for the function<br>
                                  "intelDRI2Flush()" in the file
                                  mentioned above. &nbsp;It should be near<br>
                                  the top of the file. &nbsp;Just replace
                                  that function definition with<br>
                                  this one:<br>
                                  <br>
                                  static void<br>
                                  intelDRI2Flush(__DRIdrawable
                                  *drawable)<br>
                                  {<br>
                                  &nbsp; &nbsp;GET_CURRENT_CONTEXT(ctx);<br>
                                  &nbsp; &nbsp;struct intel_context *intel =
                                  intel_context(ctx);<br>
                                  <br>
                                  &nbsp; &nbsp;if (intel != NULL) { /* add this...
                                  */<br>
                                  &nbsp; &nbsp; &nbsp; &nbsp;if (intel-&gt;gen&lt; &nbsp;4)<br>
                                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTEL_FIREVERTICES(intel);<br>
                                  <br>
                                  &nbsp; &nbsp; &nbsp; &nbsp;intel-&gt;need_throttle =
                                  GL_TRUE;<br>
                                  <br>
                                  &nbsp; &nbsp; &nbsp; &nbsp;if (intel-&gt;batch.used)<br>
                                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                  &nbsp;intel_batchbuffer_flush(intel);<br>
                                  &nbsp; &nbsp;} /* ...and this */<br>
                                  }<br>
                                  <br>
                                  As I commented above, the patch just
                                  adds two lines, which just do a<br>
                                  NULL pointer safety check.<br>
                                  <br>
                                  So, generic instructions would be:<br>
                                  <br>
                                  &nbsp; &nbsp; - get your distro's newest mesa
                                  source package<br>
                                  &nbsp; &nbsp; - unpack it (e.g. RPMs are really
                                  cpio archives)<br>
                                  &nbsp; &nbsp; - track down the intel_screen.c
                                  file and patch (or manually<br>
                                  &nbsp; &nbsp; &nbsp; edit) it as described above<br>
                                  &nbsp; &nbsp; - re-package the mesa source
                                  package<br>
                                  &nbsp; &nbsp; - use your distro's source package
                                  build tool to build a binary<br>
                                  &nbsp; &nbsp; &nbsp; package (e.g. rpmrebuild for
                                  RPM-based distros)<br>
                                  <br>
                                  Working with your distro's source
                                  packages should be well-documented<br>
                                  (at least for major distros like
                                  Ubuntu and Fedora).<br>
                                  <br>
                                  The other option is to wait: I also
                                  reported my success with this on<br>
                                  the elrepo mailing list. &nbsp;The elrepo
                                  mesa maintainer said he didn't<br>
                                  want to update the package with a
                                  patch that wasn't committed<br>
                                  (according to this thread, it is now,
                                  but wasn't when I made the<br>
                                  comment). &nbsp;So I would imagine that
                                  package maintainers will probably<br>
                                  be open to incorporating this patch
                                  into their builds now that it's<br>
                                  officially committed... I might
                                  request it for elrepo if I get<br>
                                  around to it.<br>
                                  <br>
                                  In other words, with this patch
                                  officially committed, it will<br>
                                  eventually make its way into different
                                  distro's mesa builds.<br>
                                  <br>
                                  HTH,<br>
                                  Matt<br>
                                  <br>
_______________________________________________<br>
                                  mythtv-users mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:mythtv-users@mythtv.org"
                                    target="_blank">mythtv-users@mythtv.org</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://www.mythtv.org/mailman/listinfo/mythtv-users"
                                    target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
                                </blockquote>
                                Matt<br>
                                I appreciate your input on this issue.
                                Not being a programmer, I can't get my
                                brain wrapped around all that needs to
                                be considered or done to test this
                                patch. With that said, I have setup with
                                xorg-edgers in anticipation that the
                                patch will work it's way down stream. I
                                contacted one of the dev's at
                                xorg-edgers and he replied that the
                                patch should be available within a week
                                or two ( that was about a week ago). I
                                have since received a couple of updates
                                from them but I'm not sure if the patch
                                was included. Is there a way to check
                                (other than just trying vaapi with
                                mythtv) to see if the patch is included
                                or has been received by me?<br>
                                Thanks<br>
                                William<br>
                              </blockquote>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    I'm a fish out of water here. I tried to find the
                    source on the xorg-edgers site for over an hour but
                    no luck. The only thing I found was this:<br>
                    <br>
                    <a moz-do-not-send="true"
href="http://bazaar.launchpad.net/%7Evcs-imports/mesa/master/revision/26908"
                      target="_blank">http://bazaar.launchpad.net/~vcs-imports/mesa/master/revision/26908</a><br>
                    <br>
                    The other url doesn't work anymore. Also I sent an
                    email to one of the dev's. <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
mythtv-users mailing list
<a moz-do-not-send="true" href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a>
<a moz-do-not-send="true" href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
</pre>
                  </blockquote>
                </div>
              </div>
              <div class="im"> I tried the opengl option for render and
                osd render and it works with ffmpeg. So the patch must
                be working. I will try to use debug again with vaapi and
                see if i can get errors to post since the vaapi decoder
                option still isn't working.<br>
              </div>
            </div>
          </blockquote>
        </div>
        This the latest debug using the latest master:<br>
        <br>
        gdb.txt<br>
        <br>
        <a moz-do-not-send="true"
          href="http://dl.dropbox.com/u/17574275/gdb%202-6-12.txt">http://dl.dropbox.com/u/17574275/gdb%202-6-12.txt</a><br>
        <br>
        myth.log<br>
        <br>
        <a moz-do-not-send="true"
          href="http://dl.dropbox.com/u/17574275/myth%202-6-12.log">http://dl.dropbox.com/u/17574275/myth%202-6-12.log</a><br>
        <br>
        terminal capture<br>
        <br>
        <a moz-do-not-send="true"
          href="http://dl.dropbox.com/u/17574275/MythtvBacktrace%202-6-12">http://dl.dropbox.com/u/17574275/MythtvBacktrace%202-6-12</a><br>
        <br>
        I also changed from ubuntu 11.10 to 12.4. A side note, mythtv
        plays without tearing using ffmpeg and opengl with unity.<br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
mythtv-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
</pre>
      </blockquote>
      This statement keeps repeating in the command line but not showing
      up in <br>
      gdb.txt or myth.log:<br>
      intel_do_flush_locked failed: Input/output error<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
</pre>
    </blockquote>
    I ran debug on the latest master v0.25pre-4398-g7090d59 and got the
    same result:<br>
    intel_do_flush_locked failed: Input/output error<br>
    The logs look the same so I'm not posting them.<br>
  </body>
</html>