Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: dri-devel@lists.freedesktop.org, harry.wentland@amd.com,
	 Simona Vetter <simona@ffwll.ch>,
	Alex Deucher <alexander.deucher@amd.com>,
	 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 David Airlie <airlied@gmail.com>,
	Xaver Hugl <xaver.hugl@gmail.com>,
	amd-gfx@lists.freedesktop.org,
	 "open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS"
	<intel-gfx@lists.freedesktop.org>,
	 "open list:INTEL DRM DISPLAY FOR XE AND I915 DRIVERS"
	<intel-xe@lists.freedesktop.org>,
	"Mario Limonciello (AMD)" <superm1@kernel.org>,
	 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: Re: [PATCH v6 03/10] drm: link connectors to backlight devices
Date: Tue, 7 Jul 2026 13:53:23 +0200	[thread overview]
Message-ID: <20260707-impartial-fierce-vole-fd0e35@penduick> (raw)
In-Reply-To: <8a4356c5-de49-43a4-a4ee-cf771ed65f18@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]

On Fri, Jun 26, 2026 at 04:40:56PM -0500, Mario Limonciello wrote:
> > > + * Drivers have to call drm_backlight_alloc() after allocating a connector via
> > > + * drm_connector_init(). This will automatically add a backlight device to the
> > > + * given connector. Drivers must then link a hardware backlight by calling
> > > + * drm_backlight_link() with the registered backlight_device. If no link is
> > > + * established, the DRM backlight property reports an empty range and
> > > + * brightness changes are no-ops.
> > > + */
> > 
> > It's not clear to me why we need to dynamically allocate them at all. If
> > we're using the backlight subsystem we'll already have a handle to it.
> > If we don't and want to implement something like DDC/CI, then it just
> > becomes a hassle. Why not treat it like i2c, add a backlight field to
> > drm_connector, and create the link at registration, add a new hook to
> > set luminance, and then provide helpers to either use the backlight API,
> > or anything else if the driver wants to.
> 
> I did envision that later on we can have displays with DDC use this
> infrastructure as well.  But I didn't want to hold up the series
> implementing that.

Oh absolutely. My point wasn't that you should support it right away,
but rather that the architecture you work on would be extensible enough
to accomodate for them later on.

I'm exagerating, but for example having an architecture built around
having a backlight device doesn't work, but having one where you have a
set of helpers built around the backlight API does, because then we can
easily create new helpers to deal with DDC/CI, MIPI-DCS, etc. without
reworking the core part.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

  reply	other threads:[~2026-07-07 11:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 16:57 [PATCH v6 00/10] Add support for a DRM backlight capability Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 01/10] Revert "backlight: Remove notifier" Mario Limonciello
2026-06-26 11:41   ` Thomas Zimmermann
2026-06-24 16:57 ` [PATCH v6 02/10] backlight: add kernel-internal backlight API Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 03/10] drm: link connectors to backlight devices Mario Limonciello
2026-06-26  7:34   ` Maxime Ripard
2026-06-26 21:40     ` Mario Limonciello
2026-07-07 11:53       ` Maxime Ripard [this message]
2026-06-26 11:49   ` Thomas Zimmermann
2026-06-24 16:57 ` [PATCH v6 04/10] DRM: Add support for client indicating support for luminance Mario Limonciello
2026-07-21 18:31   ` Hans de Goede
2026-06-24 16:57 ` [PATCH v6 05/10] drm/amd/display: Pass up errors reading actual brightness Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 06/10] drm/amd/display: Allow backlight registration to fail Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 07/10] drm/amd/display: use drm backlight Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 08/10] drm/amd/display: Drop brightness caching in amdgpu_dm Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 09/10] drm/bridge: auto-link panel backlight in bridge connector Mario Limonciello
2026-06-24 16:57 ` [PATCH v6 10/10] drm/i915/display: use drm backlight Mario Limonciello
2026-07-21 17:50 ` [PATCH v6 00/10] Add support for a DRM backlight capability Hans de Goede
2026-07-21 18:19   ` Hans de Goede

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=20260707-impartial-fierce-vole-fd0e35@penduick \
    --to=mripard@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=simona@ffwll.ch \
    --cc=superm1@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=xaver.hugl@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