Open her opened 5 years ago
Can you be more specific in what kind of documentation you are requestiong, please?
Sure, thanks for the request of clarification @zeising
Specifically kernel flags passed into the system at boot time with /boot/loader.conf
For example: drm.i915.enable_fb="1"
Supposedly enables frame buffer compression, but I’ve not been able to find documentation for this, or for other reported configurations like, drm.i915.semaphores=
I spent some time reading the source code last night and while I found the code for parameters ( https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/i915/i915_params.h) as well i915_parser.h I didn’t find any comments documenting the intended functionality of these parameters.
I’d like to help contribute and if there is no documentation I’d be happy to cut drafts and share with contributors here for sign off. But I need help on where to go next.
Thanks!
Hi
On FreeBSD these are mapped to sysctl compat.linuxkpi
. The best way to see what's available for your driver is to execute sysctl compat.linuxkpi
after you loaded the driver.
For description of what these parameters do, call sysctl with the description flag.
johannes@jm:/usr/src % sysctl -d compat.linuxkpi.enable_fbc
compat.linuxkpi.enable_fbc: Enable frame buffer compression for power savings (default: -1 (use per-chip default))
This small how-to information will be documented in our updated wiki. I don't think there's any point in documenting each parameter since these tend to come and go. I looked through 01.org but couldn't even find anything documented there regarding parameters...
And a nice way to discover this (the compat.linuxkpi
namespace) would've been:
sysctl -a | grep enable_fbc
It's unfortunate that setting something like drm.i915.enable_fbc
is just silently ignored though. And many people still have that in loader.conf
from the old drivers in base. Or from just finding outdated info on google. @johalun maybe the new i915 driver should register the drm.i915
sysctls and loudly complain about anything under drm.i915
being set?
Yeah I've been thinking about that too. Not sure why they were moved to compat.linuxkpi.. Maybe because of collision with drm in base?.. Anyways, I'll look into it.
@johalun @myfreeweb thank you both very much for the information.
I'd like to help document these things because right now if someone starts googling around or watching folks on YouTube, it's easy for them to get the wrong idea.
What if I started simple and put something on the wiki here after grepping sysctl that documents these flags? Would that be a good start?
@johalun I know you mentioned those flags being outdated quickly but I wouldn't mind being paged to update or maintain something like that.
@myfreeweb if the drm.i915.enable_fbc
is silently ignored, mind pointing me in the right direction in the code where I can read and find other parameters that may also be ignored?
Thanks guys
Sorry if it wasn't clear — drm.i915.ANYTHING
is silently ignored, you should use compat.linuxkpi.THAT_THING
instead. So compat.linuxkpi.enable_fbc
and so on.
@her If you insist :smiley: If you would document the parameters and what they do, we'd love to put that on the official freebsd wiki. We are currently in the process of updating it https://wiki.freebsd.org/Graphics2
The best place to find information about the parameters I think is in the source code i915: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/i915/i915_params.c amdgpu: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c radeonkms: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/radeon/radeon_drv.c vmwgfx: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
All of the above will be accessible directly under sysctl compat.linuxkpi
when a driver is loaded.
There are a few that exist under dev.drm
for historical reasons. These are used for debug options.
johannes@vmw:~ % sysctl dev.drm
dev.drm.0.PCI_ID: 15ad:405
dev.drm.128.PCI_ID: 15ad:405
dev.drm.always_interruptible: 0
dev.drm.error_panic: 0
dev.drm.drm_debug_persist: 1
dev.drm.skip_ddb: 1
dev.drm.drm_debug: 0
Great! I'll start there and give this a first pass tonight then. If it works for you guys I can post that here in this thread and just request y'all comment on it and I'll update accordingly?
Where can I find documentation relating to kernel parameter configuration?
Is this documented?