Skip to content

Commit 67abe9c

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: video: Remove register_backlight_delay module option and code
Since commit 5aa9d94 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default"), the delayed registering of acpi_video# backlight devices has been disabled by default. The few bugreports where this option was used as a workaround were all cases where the GPU driver did not call acpi_video_register_backlight() and the workaround was to pass video.register_backlight_delay=1. With the recent "ACPI: video: Make acpi_backlight=video work independent from GPU driver" changes acpi_backlight=video can be used to achieve the same result. So there is no need for the register_backlight_delay option + code anymore. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 09a9639 commit 67abe9c

3 files changed

Lines changed: 0 additions & 44 deletions

File tree

drivers/acpi/acpi_video.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ module_param(device_id_scheme, bool, 0444);
7070
static int only_lcd = -1;
7171
module_param(only_lcd, int, 0444);
7272

73-
static int register_backlight_delay;
74-
module_param(register_backlight_delay, int, 0444);
75-
MODULE_PARM_DESC(register_backlight_delay,
76-
"Delay in seconds before doing fallback (non GPU driver triggered) "
77-
"backlight registration, set to 0 to disable.");
78-
7973
static bool may_report_brightness_keys;
8074
static int register_count;
8175
static DEFINE_MUTEX(register_count_mutex);
@@ -84,9 +78,6 @@ static LIST_HEAD(video_bus_head);
8478
static int acpi_video_bus_add(struct acpi_device *device);
8579
static void acpi_video_bus_remove(struct acpi_device *device);
8680
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
87-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored);
88-
static DECLARE_DELAYED_WORK(video_bus_register_backlight_work,
89-
acpi_video_bus_register_backlight_work);
9081

9182
/*
9283
* Indices in the _BCL method response: the first two items are special,
@@ -2096,11 +2087,6 @@ static void acpi_video_bus_remove(struct acpi_device *device)
20962087
kfree(video);
20972088
}
20982089

2099-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored)
2100-
{
2101-
acpi_video_register_backlight();
2102-
}
2103-
21042090
static int __init is_i740(struct pci_dev *dev)
21052091
{
21062092
if (dev->device == 0x00D1)
@@ -2183,17 +2169,6 @@ static bool should_check_lcd_flag(void)
21832169
return false;
21842170
}
21852171

2186-
/*
2187-
* At least one graphics driver has reported that no LCD is connected
2188-
* via the native interface. cancel the registration for fallback acpi_video0.
2189-
* If another driver still deems this necessary, it can explicitly register it.
2190-
*/
2191-
void acpi_video_report_nolcd(void)
2192-
{
2193-
cancel_delayed_work(&video_bus_register_backlight_work);
2194-
}
2195-
EXPORT_SYMBOL(acpi_video_report_nolcd);
2196-
21972172
int acpi_video_register(void)
21982173
{
21992174
int ret = 0;
@@ -2222,18 +2197,6 @@ int acpi_video_register(void)
22222197
*/
22232198
register_count = 1;
22242199

2225-
/*
2226-
* acpi_video_bus_add() skips registering the userspace visible
2227-
* backlight_device. The intend is for this to be registered by the
2228-
* drm/kms driver calling acpi_video_register_backlight() *after* it is
2229-
* done setting up its own native backlight device. The delayed work
2230-
* ensures that acpi_video_register_backlight() always gets called
2231-
* eventually, in case there is no drm/kms driver or it is disabled.
2232-
*/
2233-
if (register_backlight_delay)
2234-
schedule_delayed_work(&video_bus_register_backlight_work,
2235-
register_backlight_delay * HZ);
2236-
22372200
leave:
22382201
mutex_unlock(&register_count_mutex);
22392202
return ret;
@@ -2244,7 +2207,6 @@ void acpi_video_unregister(void)
22442207
{
22452208
mutex_lock(&register_count_mutex);
22462209
if (register_count) {
2247-
cancel_delayed_work_sync(&video_bus_register_backlight_work);
22482210
acpi_bus_unregister_driver(&acpi_video_bus);
22492211
register_count = 0;
22502212
may_report_brightness_keys = false;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4445,10 +4445,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
44454445
amdgpu_set_panel_orientation(&aconnector->base);
44464446
}
44474447

4448-
/* If we didn't find a panel, notify the acpi video detection */
4449-
if (dm->adev->flags & AMD_IS_APU && dm->num_of_edps == 0)
4450-
acpi_video_report_nolcd();
4451-
44524448
/* Software is initialized. Now we can register interrupt handlers. */
44534449
switch (adev->asic_type) {
44544450
#if defined(CONFIG_DRM_AMD_DC_SI)

include/acpi/video.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ enum acpi_backlight_type {
5353
};
5454

5555
#if IS_ENABLED(CONFIG_ACPI_VIDEO)
56-
extern void acpi_video_report_nolcd(void);
5756
extern int acpi_video_register(void);
5857
extern void acpi_video_unregister(void);
5958
extern void acpi_video_register_backlight(void);
@@ -81,7 +80,6 @@ static inline bool acpi_video_backlight_use_native(void)
8180
return __acpi_video_get_backlight_type(true, NULL) == acpi_backlight_native;
8281
}
8382
#else
84-
static inline void acpi_video_report_nolcd(void) { return; };
8583
static inline int acpi_video_register(void) { return -ENODEV; }
8684
static inline void acpi_video_unregister(void) { return; }
8785
static inline void acpi_video_register_backlight(void) { return; }

0 commit comments

Comments
 (0)