public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Mehdi Djait <mehdi.djait.k@gmail.com>,
	daniel@ffwll.ch, maarten.lankhorst@linux.intel.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: drm/tiny: QUESTION: What to use instead of drm_simple_display_pipe ?
Date: Tue, 19 Mar 2024 09:35:48 +0100	[thread overview]
Message-ID: <da7cfff1-e147-48ea-bcda-9ea913e5feee@suse.de> (raw)
In-Reply-To: <ZfiTbYAa7qxXlrPd@mehdi-archlinux>

Hi

Am 18.03.24 um 20:18 schrieb Mehdi Djait:
> Hello everyone :)
>
> I am implementing a tiny drm driver and I am currently working on the
> V2: https://lore.kernel.org/dri-devel/cover.1701267411.git.mehdi.djait@bootlin.com/
>
> I got a review on the v1 telling me not to use the
> drm_simple_display_pipe. Can someone please explain this further ? Or
> give me an example drm driver that does it the right way ?

You can copy the code from drm_simple_kms_helper.c into your driver file 
and start inlining everything. For example

  1) Your driver calls drm_simple_display_pipe_init(), so you copy that 
code into your source file
  2) drm_simple_display_pipe_init() uses drm_simple_kms_plane_funcs and 
drm_simple_kms_crtc_funcs, so you copy these into your source file; 
together with the drm_simple_kms_*() helpers that they use for their 
callback pointers.
  3) Mayb do this for other drm_simple_kms_*() code.
  4) Then start inlining: inline your copy of 
drm_simple_display_pipe_iit(). Instead of using 
sharp_ls027b7dh01_pipe_funcs, inline its functions into your copy of the 
callers. And so on.
  5) Rename the resulting code, so that it fits you driver.

With careful changes, you 'll end up with the same functionality as 
before, but without the intermediate layer of the simple-KMS code.

Best regards
Thomas

>
> --
> Kind Regards
> Mehdi Djait

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


  reply	other threads:[~2024-03-19  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 19:18 drm/tiny: QUESTION: What to use instead of drm_simple_display_pipe ? Mehdi Djait
2024-03-19  8:35 ` Thomas Zimmermann [this message]
2024-03-19  8:52   ` Javier Martinez Canillas
2024-03-20 18:59     ` Mehdi Djait

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=da7cfff1-e147-48ea-bcda-9ea913e5feee@suse.de \
    --to=tzimmermann@suse.de \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mehdi.djait.k@gmail.com \
    /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