[PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

Michel Dänzer michel at daenzer.net
Thu Apr 20 09:25:20 UTC 2017


On 20/04/17 03:59 AM, Felix Kuehling wrote:
> On 17-04-11 10:23 PM, Michel Dänzer wrote:
>> One possibility would be making each driver also parse the other
>> driver's module parameter on the kernel command line. I.e. radeon would
>> parse
>>
>>  amdgpu.enable_cik=0
> I looked for a way to do this. I think I figured out the parsing part.
> But I can't see where to get the kernel command line from. The command
> line that is parsed by modules in load_module comes from user mode, and
> I think it's pre-processed by modprobe to strip the "<module>." prefix
> and only include the module-specific options.
> 
> There is a global variable saved_command_line, which is what's used for
> /proc/cmdline. But that variable is not exported to modules.

I see two possibilities:

Either use __module_param_call directly, like
drivers/tty/serial/8250/8250_core.c:s8250_options().

Or use __setup, like e.g.
drivers/video/fbdev/core/fb_cmdline.c:video_setup().

I'm leaning towards the former.


Anyway, my offer to look into this as a follow-up change stands; the
only issue that needs to be resolved for your patch to land is the
Kconfig options.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list