public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Murthy, Arun R" <arun.r.murthy@intel.com>,
	"Manna, Animesh" <animesh.manna@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [RFC PATCH 4/5] drm/i915/display: prepend connector name to the backlight
Date: Tue, 21 Jun 2022 10:17:28 +0300	[thread overview]
Message-ID: <87letqscxj.fsf@intel.com> (raw)
In-Reply-To: <DM6PR11MB31778B9F5ACB76E68A804074BAB39@DM6PR11MB3177.namprd11.prod.outlook.com>

On Tue, 21 Jun 2022, "Murthy, Arun R" <arun.r.murthy@intel.com> wrote:
>> On Fri, 03 Jun 2022, "Murthy, Arun R" <arun.r.murthy@intel.com> wrote:
>> >> On Thu, 02 Jun 2022, Animesh Manna <animesh.manna@intel.com>
>> wrote:
>> >> > From: Arun R Murthy <arun.r.murthy@intel.com>
>> >> >
>> >> > With the enablement of dual eDP, there will have to exist two
>> >> > entries of backlight sysfs file. In order to avoid sysfs file name
>> >> > duplication, the file names are prepended with the connector name.
>> >>
>> >> Fixed by 20f85ef89d94 ("drm/i915/backlight: use unique backlight
>> >> device
>> >> names") about a year ago.
>> >>
>> > This patches checks if the return value is -EEXIST and then acts accordingly,
>> but -EEXIST is not returned.
>> > struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
>> >                                          const char *name,
>> >                                          umode_t mode, kuid_t uid, kgid_t gid,
>> >                                          loff_t size,
>> >                                          const struct kernfs_ops *ops,
>> >                                          void *priv, const void *ns,
>> >                                          struct lock_class_key *key) {
>> >         struct kernfs_node *kn;
>> >         unsigned flags;
>> >         int rc;
>> >
>> >         flags = KERNFS_FILE;
>> >
>> >         kn = kernfs_new_node(parent, name, (mode & S_IALLUGO) | S_IFREG,
>> >                              uid, gid, flags);
>> >         if (!kn)
>> >                 return ERR_PTR(-ENOMEM);
>> >
>> > So the condition check with not be satisfied and the backlight registration
>> will fail for the 2nd backlight device.
>>
>> But the file isn't added by kernfs_new_node(), it just allocates the node. See
>> the kernfs_add_one() later in __kernfs_create_file().
>>
> Moreover now that we will be supporting dual display, wouldn't it
> be better to have the same file naming convention for both the
> displays?
> Without this patch, the first backlight would create an interface
> with name intel_backlight and for the second it would create as
> "cardXX-XXX-backlight". There wont be any similarities in the
> backlight naming convention.
> Would it be better to maintain the same naming convention
> across the displays?

The old name can't be changed.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-06-21  7:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 14:18 [Intel-gfx] [RFC PATCH 0/5] Dual LFP/EDP enablement Animesh Manna
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 1/5] drm/i915/bios: calculate drrs mode using panel index for dual LFP Animesh Manna
2022-06-02 15:07   ` Jani Nikula
2022-06-02 15:11     ` Jani Nikula
2022-06-03  9:43       ` Manna, Animesh
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 2/5] drm/i915/display: Use panel index to parse panel timing for dual EDP Animesh Manna
2022-06-02 15:12   ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 3/5] drm/i915/display: Use panel index to parse lfp backlight Animesh Manna
2022-06-02 15:13   ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 4/5] drm/i915/display: prepend connector name to the backlight Animesh Manna
2022-06-02 15:16   ` Jani Nikula
2022-06-03  3:34     ` Murthy, Arun R
2022-06-03  7:02       ` Jani Nikula
2022-06-21  6:01         ` Murthy, Arun R
2022-06-21  7:17           ` Jani Nikula [this message]
2022-07-13  8:17   ` [Intel-gfx] [PATCHv2] drm/i915/display: add support for dual panel backlight Arun R Murthy
2022-08-02 15:00     ` Jani Nikula
2022-08-03  8:10       ` Murthy, Arun R
2022-08-03  8:08     ` [Intel-gfx] [PATCHv3] " Arun R Murthy
2022-08-03  8:19       ` Jani Nikula
2022-06-02 14:18 ` [Intel-gfx] [RFC PATCH 5/5] drm/i915/display/tgl+: Use PPS index from vbt Animesh Manna
2022-06-02 15:32   ` Jani Nikula
2022-06-03 10:29     ` Manna, Animesh
2022-06-02 16:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Dual LFP/EDP enablement Patchwork
2022-06-02 16:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-06-02 16:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-02 19:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-07-13  9:27 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Dual LFP/EDP enablement (rev2) Patchwork
2022-08-03  8:42 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Dual LFP/EDP enablement (rev3) Patchwork

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=87letqscxj.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.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