Re: [PATCH] Add intel drm blacklist to intel_opregion_present detect

Joey Lee
2010-08-24T07:03:59Z

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

Hi Matthew,

於 一，2010-08-23 於 18:51 +0100，Matthew Garrett 提到：
> On Mon, Aug 23, 2010 at 07:53:21PM +0200, Thomas Renninger wrote:
>
> > Hm, needing a module option to get a system running is not what the user expects.
> > By default, the system should run fine and a module option should be added
> > as a workaround or for debugging only.
>
> How about we do this instead: add a psb stub driver that does nothing
> other than call acpi_backlight_register()?
>

The attached file is a draft stub driver for poulsbo. Like you said, it
will only call acpi_video_register and acpi_video_unregister when
initial and exit.
And I added the Poulsbo pci id in the module alias.

It's works to me, where can we put the driver? in driver/staging ? or
put in driver/gpu/stub ?

Thank's a lot!
Joey Lee

[-- Attachment #2: poulsbo.c --]
[-- Type: text/plain, Size: 586 bytes --]

#include <linux/module.h>
#include <acpi/video.h>

static int __init poulsbo_init(void)
{
printk(KERN_INFO "poulsbo: stub driver load.\n");
return acpi_video_register();
}

static void __exit poulsbo_cleanup(void)
{
acpi_video_unregister();
printk(KERN_INFO "poulsbo: stub driver unloaded.\n");
}

module_init(poulsbo_init);
module_exit(poulsbo_cleanup);

MODULE_AUTHOR("Joey Lee");
MODULE_DESCRIPTION("Poulsbo Stub Driver");
MODULE_LICENSE("GPL");

MODULE_ALIAS("pci:v00008086d00008108sv*sd*bc*sc*i*");
MODULE_ALIAS("pci:v00008086d00008109sv*sd*bc*sc*i*");