On Mon, 2010-09-13 at 09:54 +0200, Michel D?nzer wrote: 
> On Mit, 2010-09-08 at 12:32 -0400, Matthew Garrett wrote: 
> > From: Michel D?nzer <michel at daenzer.net>
> > 
> > Allows e.g. power management daemons to control the backlight level. 
> > Inspired
> > by the corresponding code in radeonfb.
> > 
> > (Updated to add backlight type and make the connector the parent device - 
> > mjg)
> > 
> > Signed-off-by: Michel D?nzer <daenzer at vmware.com>
> > Signed-off-by: Matthew Garrett <mjg at redhat.com>
> 
> Thanks for picking this up, Matthew.
> 
> Unfortunately, it fails to build here:
> 
>   CC [M]  drivers/gpu/drm/radeon/radeon_legacy_encoders.o
> drivers/gpu/drm/radeon/radeon_legacy_encoders.c: In function 
> ?radeon_legacy_backlight_init?:
> drivers/gpu/drm/radeon/radeon_legacy_encoders.c:358: error: implicit 
> declaration of function ?pmac_has_backlight_type?
> drivers/gpu/drm/radeon/radeon_legacy_encoders.c:403: error: implicit 
> declaration of function ?machine_is_compatible?
> make[1]: *** [drivers/gpu/drm/radeon/radeon_legacy_encoders.o] Error 1
> make: *** [_module_drivers/gpu/drm/radeon] Error 2

Also, radeon_get_connector_for_encoder() only works when a mode is set,
connector->kdev is only initialized after drm_sysfs_connector_add(), and
I deliberately chose the backlight device name ending in "bl" because
that's what pbbuttonsd looks for (though of course that could be fixed
there).

The updated patch below fixes these issues, successfully using this
right now.

Reply via email to