On Mon, 04 Apr 2022, "Modem, Bhanuprakash" bhanuprakash.modem@intel.com wrote:
Note how we have intel_connector_debugfs_add() for connector debugfs and intel_crtc_debugfs_add() for crtc debugfs, and how this patch just mixes up the two by looking up crtc and state from the connector debugfs.
This debugfs is already introduced & using by AMD: https://patchwork.freedesktop.org/patch/308586
Wait, what?
Both amd and i915 adding the name "output_bpc" is *not* the way to roll. We only add i915_ prefixed debugfs files from i915.ko.
If you need this to be a standard interface across drivers, IMO it should be added in common drm code, not sprinkled around in drivers.
I see that amd is already using this in what is basically drm core debugfs namespace, and there's amd specific IGT built on top.
Adding a bunch of Cc's to get some clarity on drm debugfs naming and usage.
BR, Jani.
On Mon-04-04-2022 04:16 pm, Jani Nikula wrote:
I just tried to adopt from existing AMD's implementation, and it may be reduce the number of debugfs nodes.
"Maximum" is from connector's display_info (Needs connector debugfs) "Current" is from crtc state (Needs crtc debugfs)
As display_info is the member of drm_connector, perhaps we can move "Maximum" value to drm layer and can use common name. Example: /sys/kernel/debug/dri/0/DP-1/max_bpc
And each hardware specific driver could create a crtc debugfs node for "Current" value in their name space. Example: /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc
Please suggest.
- Bhanu
On Mon, Apr 04, 2022 at 01:46:23PM +0300, Jani Nikula wrote:
Yeah vendor prefix would be nice, but it's debugfs so we can always fix it.
Also would be really good to pull that output_bpc into drm core if it's something standard that igts need in general, so ideally we don't just standardize the drm side, but also the testcases that need this and make them generic to run on any kms driver. -Daniel
On Mon-04-04-2022 09:11 pm, Daniel Vetter wrote:
I made the required changes in both IGT & Kernel and floated to ML, please help to review.
IGT: https://patchwork.freedesktop.org/series/102387/ Kernel: https://patchwork.freedesktop.org/series/102390/
- Bhanu
dri-devel@lists.freedesktop.org