};
static void
-amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm)
+amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm,
+ struct amdgpu_dm_connector *aconnector)
{
char bl_name[16];
struct backlight_properties props = { 0 };
adev_to_drm(dm->adev)->primary->index + dm->num_of_edps);
dm->backlight_dev[dm->num_of_edps] = backlight_device_register(bl_name,
- adev_to_drm(dm->adev)->dev,
+ aconnector->base.kdev,
dm,
&amdgpu_dm_backlight_ops,
&props);
static void register_backlight_device(struct amdgpu_display_manager *dm,
+ struct amdgpu_dm_connector *aconnector,
struct dc_link *link)
{
if ((link->connector_signal & (SIGNAL_TYPE_EDP | SIGNAL_TYPE_LVDS)) &&
* is better then a black screen.
*/
if (!dm->backlight_dev[dm->num_of_edps])
- amdgpu_dm_register_backlight_device(dm);
+ amdgpu_dm_register_backlight_device(dm, aconnector);
if (dm->backlight_dev[dm->num_of_edps]) {
dm->backlight_link[dm->num_of_edps] = link;
if (ret) {
amdgpu_dm_update_connector_after_detect(aconnector);
- register_backlight_device(dm, link);
+ register_backlight_device(dm, aconnector, link);
if (dm->num_of_edps)
update_connector_ext_caps(aconnector);