<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [exynos-drm] failed to presentate a dumb buffer format NV12 with modifier DRM_FORMAT_MOD_SAMSUNG_64_32_TILE"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110327">110327</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[exynos-drm] failed to presentate a dumb buffer format NV12 with modifier DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>ARM
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zillevdr@gmx.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=143863" name="attach_143863" title="picture from screen">attachment 143863</a> <a href="attachment.cgi?id=143863&action=edit" title="picture from screen">[details]</a></span>
picture from screen

I want to decode a H264 1280x720 video with v4l2 decoder and present this on
DRM with a dumb buffer.

On screen the Y plane is correct but UV plane have the doubled height. Pitch is
correct. But looks like a line from uv plane is used for 4 lines on y plane
instead of 2. Attached are a picture from the screen. I use the format
describtion from:
<a href="https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-nv12mt.html">https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-nv12mt.html</a>. 

For dumb buffer configuration the height must aligned to 64 instead of to 32.
If align height to 32 EINVAL is returned from AddFB2. OK, the UV plane have the
half height from Y plane and must aligned to 32.

The size from DRM_IOCTL_CREATE_DUMB_BUFFER is to big. IOCTL returned a dumb
buffer size from 1966080.
width = 1280 => aligned to 128 width = 1280
height = 720 => aligned to 64 height = 768
Y plane 1280 * 768 = 983040
UV plane 1280 * 768 / 2 = 491520
Dumb buffer size should be 1474560. Looks like the UV plane have doubled size
as it should be.

The device is a Odroid-U3 with Exynos4412.
Kernel version is 5.0.5.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>