public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Daniel Vetter <daniel@ffwll.ch>, Jose Abreu <Jose.Abreu@synopsys.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: Re: DRM DMA Engine
Date: Wed, 15 Jun 2016 10:48:27 +0100	[thread overview]
Message-ID: <5761246B.1020305@synopsys.com> (raw)
In-Reply-To: <CAKMK7uFmvkmBa4NtqU5tcUGb_DHoifkLp0qG+e65b-OURsEBwA@mail.gmail.com>

Hi Daniel,


On 15-06-2016 09:52, Daniel Vetter wrote:
> On Tue, Jun 14, 2016 at 1:19 PM, Jose Abreu <Jose.Abreu@synopsys.com> wrote:
>>> I assume that xilinx VDMA is the only way to feed pixel data into your
>>> display pipeline. Under that assumption:
>>>
>>> drm_plane should map to Xilinx VDMA, and the drm_plane->drm_crtc link
>>> would represent the dma channel. With atomic you can subclass
>>> drm_plane/crtc_state structures to store all the runtime configuration in
>>> there.
>>>
>>> The actual buffer itsel would be represented by a drm_framebuffer, which
>>> either wraps a shmem gem or a cma gem object.
>>>
>>> If you want to know about the callbacks used by the atomic helpers to push
>>> out plane updates, look at the hooks drm_atomic_helper_commit_planes()
>>> (and the related functions, see kerneldoc) calls.
>>>
>>> I hope this helps a bit more.
>>> -Daniel
>> Thanks a lot! With your help I was able to implement all the
>> needed logic. Sorry to bother you but I have one more question.
>> Right now I can initialize and configure the vdma correctly but I
>> can only send one frame. I guess when the dma completes
>> transmission I need to ask drm for a new frame, right? Because
>> the commit function starts the vdma correctly but then the dma
>> halts waiting for a new descriptor.
> DRM has a continuous scanout model, i.e. when userspace doesn't give
> you a new frame you're supposed to keep scanning out the current one.
> So you need to rearm your upload code with the same drm_framebuffer if
> userspace hasn't supplied a new one since the last time before the
> vblank period starts.
>
> This is different to v4l, where userspace has to supply each frame
> (and the kernel gets angry when there's not enough frames and signals
> an underrun of the queue). This is because drm is geared at desktops,
> and there it's perfectly normal to show the exact same frame for a
> long time.
> -Daniel

Thanks, I was thinking this was similar to v4l. I am now able to
send multiple frames so it is finally working! I have one little
implementation detail: The controller that I am using supports
deep color mode but I am using FB CMA helpers to create the
framebuffer and I've seen that the supported bpp in these helpers
only goes up to 32, right? Does this means that with these
helpers I can't use deep color? Can I implement this deep color
mode (48bpp) using a custom fb or do I also need custom gem
allocation functions (Right now I am using GEM CMA helpers)?

Best regards,
Jose Miguel Abreu

  reply	other threads:[~2016-06-15  9:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 15:46 DRM DMA Engine Jose Abreu
2016-05-26  8:06 ` Daniel Vetter
2016-05-30  8:44   ` Jose Abreu
2016-05-30  9:00     ` Jose Abreu
2016-05-30  9:36       ` Daniel Vetter
2016-06-14 11:19         ` Jose Abreu
2016-06-15  8:52           ` Daniel Vetter
2016-06-15  9:48             ` Jose Abreu [this message]
2016-06-15 10:15               ` Daniel Vetter
2016-06-16 12:09                 ` Jose Abreu
2016-06-16 12:34                   ` Daniel Vetter
2016-06-16 12:39                   ` Ilia Mirkin
2016-06-20 15:34                     ` Jose Abreu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5761246B.1020305@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox