Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177454807
D60826.1794446418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60826.1794446418.diff
View Options
diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c
--- a/sys/dev/acpica/acpi_video.c
+++ b/sys/dev/acpica/acpi_video.c
@@ -1007,6 +1007,7 @@
void *context;
ACPI_OBJECT *dod_pkg;
int count;
+ bool panel_fallback;
};
static ACPI_STATUS
@@ -1016,7 +1017,6 @@
ACPI_STATUS status;
UINT32 adr, val;
struct enum_callback_arg *argset;
- size_t i;
ACPI_SERIAL_ASSERT(video);
argset = context;
@@ -1024,7 +1024,20 @@
if (ACPI_FAILURE(status))
return (AE_OK);
- for (i = 0; i < argset->dod_pkg->Package.Count; i++) {
+ if (argset->panel_fallback) {
+ ACPI_HANDLE bcl_handle;
+
+ if (argset->count > 0 ||
+ ACPI_FAILURE(AcpiGetHandle(handle, "_BCL", &bcl_handle)))
+ return (AE_OK);
+ argset->callback(handle,
+ DOD_DEVID_INTDFP | (adr & DOD_DEVID_MASK_DISPIDX),
+ argset->context);
+ argset->count++;
+ return (AE_OK);
+ }
+
+ for (size_t i = 0; i < argset->dod_pkg->Package.Count; i++) {
if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 &&
(val & DOD_DEVID_MASK_FULL) ==
(adr & DOD_DEVID_MASK_FULL)) {
@@ -1071,11 +1084,20 @@
argset.context = context;
argset.dod_pkg = res;
argset.count = 0;
+ argset.panel_fallback = false;
status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, handle, 1,
vid_enum_outputs_subr, NULL, &argset, NULL);
+ if (ACPI_SUCCESS(status) && argset.count == 0) {
+ argset.panel_fallback = true;
+ status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, handle, 1,
+ vid_enum_outputs_subr, NULL, &argset, NULL);
+ if (ACPI_SUCCESS(status) && argset.count > 0 && bootverbose)
+ printf("%s._DOD matches no output, using _BCL\n",
+ acpi_name(handle));
+ }
if (ACPI_FAILURE(status))
printf("failed walking down %s - %s\n",
- acpi_name(handle), AcpiFormatException(status));
+ acpi_name(handle), AcpiFormatException(status));
out:
if (dod_buf.Pointer != NULL)
AcpiOsFree(dod_buf.Pointer);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 12, 1:20 AM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41080019
Default Alt Text
D60826.1794446418.diff (1 KB)
Attached To
Mode
D60826: acpi_video: fall back to _BCL when _DOD matches no output
Attached
Detach File
Event Timeline