Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Jon Hunter <jonathanh@nvidia.com>,
	daniel@ffwll.ch
Subject: Re: [PATCH] drm/tegra: Remove existing framebuffer only if we support display
Date: Thu, 07 Sep 2023 10:11:14 +0200	[thread overview]
Message-ID: <87wmx22yjh.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <ZPmCf4892gI88ZNc@orome>

Thierry Reding <thierry.reding@gmail.com> writes:

Hello Thierry,

> On Wed, Aug 30, 2023 at 08:13:04AM +0200, Javier Martinez Canillas wrote:

[...]

>> I also wonder if is worth to move the drm_num_crtcs() function from
>> drivers/gpu/drm/drm_crtc.c to include/drm/drm_crtc.h and use that helper
>> instead?
>
> I've been looking at this, there's a few things that come to mind. It
> seems like we have a couple of different ways to get the number of CRTCs
> for a device. We have struct drm_device's num_crtcs, which is set during
> drm_vblank_init(), then we have struct drm_mode_config's num_crtc, which
> is incremented every time a new CRTC is added (and decremented when a
> CRTC is removed), and finally we've got the drm_num_crtcs() which
> "computes" the number of CRTCs registered by iterating over all CRTCs
> that have been registered.
>
> Are there any cases where these three can yield different values? Would
> it not make sense to consolidate these into a single variable?
>

I als was confused by that when looked at the implementation of the
mentioned helpers and couldn't find a reason why there are different
ways to calculate the number of CRTCs.

Maybe Sima or someone else can shed some light?

> Thierry

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2023-09-07 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 13:22 [PATCH] drm/tegra: Remove existing framebuffer only if we support display Thierry Reding
2023-08-30  6:13 ` Javier Martinez Canillas
2023-09-07  7:57   ` Thierry Reding
2023-09-07  8:11     ` Javier Martinez Canillas [this message]
2023-08-30 10:19 ` Thomas Zimmermann
2023-08-31  6:33   ` Mikko Perttunen
2023-08-31  8:04     ` Daniel Vetter
2023-09-07  8:03       ` Thierry Reding
2023-09-07  8:35         ` Thomas Zimmermann
2023-09-07  8:47           ` Javier Martinez Canillas

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=87wmx22yjh.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@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