History log of /freebsd-current/sys/dev/acpica/acpi_video.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 916a5d8a 19-Apr-2022 John Baldwin <jhb@FreeBSD.org>

acpi: Remove unused devclass arguments to DRIVER_MODULE.


# 3e68d2c5 26-Dec-2021 Alexander Motin <mav@FreeBSD.org>

acpica: Remove CTLFLAG_NEEDGIANT from most sysctls.

MFC after: 2 weeks


# 5d785ad6 29-Aug-2021 Gordon Bergling <gbe@FreeBSD.org>

Fix a common typo in source code comments

- s/concurently/concurrently/

MFC after: 3 days


# 59402cc5 31-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

acpi_video(4): Put display device in to D3 state on "Display off" event.

As required by ACPI specs 6.3, appendix A.6, table B-8.


# 16b168c1 31-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

acpi_video(4): Add evdev support for reporting of video events.


# ae2b074b 31-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

acpi(9): Add EVENTHANDLERs for video and AC adapter events.

They are required for coming ACPI support in LinuxKPI.

Reviewed by: hselasky, manu (as part of D26603)


# f470cbb2 04-May-2020 Andriy Gapon <avg@FreeBSD.org>

acpi_video: try our best to work on systems without non-essential methods

Only _BCL and _BCM methods seem to be essential to the driver's
operation. If _BQC is missing then we can assume that the current
brightness is whatever we set by the last _BCM invocation. If _DCS or
_DGS is missing the we can make assumptions as well.

The change is based on a patch suggested by Anthony Jenkins
<Scoobi_doo@yahoo.com> in PR 207086.

PR: 207086
Submitted by: Anthony Jenkins <Scoobi_doo@yahoo.com (earlier version)
Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D24653


# 295e8e95 24-Apr-2020 Andriy Gapon <avg@FreeBSD.org>

acpi_video: fix a crash in detach with an LCD output

The crash happened because of a video output object was removed from a
wrong container, crt_units instead of lcd_units.

MFC after: 1 week


# a620e53d 16-Apr-2020 Colin Percival <cperciva@FreeBSD.org>

Alert devd when acpi_video brightness changes

On my Dell Latitude 7390 laptop, the brightness hotkeys
(Fn+<up/down arrow>) send ACPI notifications which acpi_video
handles by adjusting its brightness setting; but ACPI does not
actually do anything with the backlight.

Announcing brightness changes via devd makes it possible to close
the loop by triggering the intel_backlight utility to perform the
required backlight adjustment.

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D24424


# 7029da5c 26-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718


# e2e050c8 19-May-2019 Conrad Meyer <cem@FreeBSD.org>

Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions. The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended). Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.


# 8444599e 23-Feb-2016 Jung-uk Kim <jkim@FreeBSD.org>

Silence PVS-Studio warning (V595).


# 7054df7f 23-Feb-2016 Jung-uk Kim <jkim@FreeBSD.org>

Remove brightness notify handler before reinstalling new one.


# 3e4f6cc6 23-Feb-2016 Jung-uk Kim <jkim@FreeBSD.org>

Fix white spaces.


# 8d4a1dbf 23-Feb-2016 Jung-uk Kim <jkim@FreeBSD.org>

Fix style(9) bugs.


# 7a22215c 30-Nov-2013 Eitan Adler <eadler@FreeBSD.org>

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with: -arch, rdivacky
Reviewed by: cperciva


# a1836763 19-Oct-2012 John Baldwin <jhb@FreeBSD.org>

When checking to see if a video output's _ADR matches an entry in the
parent adapter's _DOD list, only check the low 16 bits of both _ADR and
_DOD. The language in the ACPI spec seems to indicate that the _ADR values
should exactly match the entries in _DOD. However, I assume that the
masking added to _DOD values was added to work around some known busted
machines (the commit history doesn't indicate either way), and the ACPI
spec does require that the low 16 bits are unique for all video outputs,
so only check the low 16 bits should be fine.

This fixes recognition of video outputs that use the new standardized
device ID scheme in ACPI 3.0 that set bit 31 such as certain Dell laptops.

Tested by: Juergen Lock nox jelal kn-bremen de
MFC after: 3 days


# 5e33d57f 17-Jun-2012 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Resotre LCD brightness level on resuming.

MFC after: 3 days


# d745c852 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# f4f04709 18-Jan-2011 Matthew D Fleming <mdf@FreeBSD.org>

Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 2e1bf57c 11-Jun-2010 Jung-uk Kim <jkim@FreeBSD.org>

Simplify a function for getting brightness levels.


# 30363a9a 11-Jun-2010 Jung-uk Kim <jkim@FreeBSD.org>

Remove unused assignment.

Found by: clang static analyzer
Found by: Coverity Prevent[tm] (CID 4537, 4538, 4539)


# 44dd6ac2 26-Apr-2010 Jung-uk Kim <jkim@FreeBSD.org>

MFC: r204773
Merge ACPICA 20100304.

MFC: r204874
Update module Makefile for ACPICA 20100304.

MFC: r204877
Allow ACPI module build on amd64. Although we strongly recommend building
it into kernel, there is no need to prevent it from building at all.

MFC: r204916
- Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode. Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.

MFC: r204920
Since the interpreter slack mode is a tunable now, enable a local hack only
when it is set. Note the default behaviour does not change by this change.

MFC: r204965
Fix white spaces.

MFC: r206117
Merge ACPICA 20100331 (and four additional upstream patches).


# 9c98a9ac 10-Mar-2010 Jung-uk Kim <jkim@FreeBSD.org>

Fix white spaces.


# 0cd9e69d 10-Mar-2010 Jung-uk Kim <jkim@FreeBSD.org>

MFC: r197438, r203810, r203813, r203935, r203936

Sync acpi_video(4) with HEAD.

r197438:
Uninline an instance of STAILQ_FOREACH_SAFE().

r203810:
Implement LCD brightness control notify handler.

r203813:
Make sanity check slightly more useful and tweak an error message.

r203935:
Add support for `cycle' and `zero' events for LCD brightness control.

r203936:
Rename some macros to clarify their intentions and fix style nits.


# 463537a0 15-Feb-2010 Jung-uk Kim <jkim@FreeBSD.org>

Rename some macros to clarify their intentions and fix style nits.


# aba311e1 15-Feb-2010 Jung-uk Kim <jkim@FreeBSD.org>

Add support for `cycle' and `zero' events for LCD brightness control.

Submitted by: Daniel Walter (d dot walter at 0x90 dot at) (intial version)


# f29d6f75 12-Feb-2010 Jung-uk Kim <jkim@FreeBSD.org>

Make sanity check slightly more useful and tweak an error message.


# 35dd1ef7 12-Feb-2010 Jung-uk Kim <jkim@FreeBSD.org>

Implement LCD brightness control notify handler.

Submitted by: Daniel Walter(d dot walter at 0x90 dot at) (intial version)


# e21bbd17 05-Feb-2010 Andriy Gapon <avg@FreeBSD.org>

MFC r197104,197105,197106,197107,197688,198237,199337,199338,200553,200554,
202771,202773: bring acpica version to 20100121

MFC details:
r197104 | jkim | 2009-09-12 01:48:53 +0300 (Sat, 12 Sep 2009) | 4 lines
MFV: r196804
Import ACPICA 20090903

r197105 | jkim | 2009-09-12 01:49:34 +0300 (Sat, 12 Sep 2009) | 2 lines
Catch up with ACPICA 20090903.

r197106 | jkim | 2009-09-12 01:50:15 +0300 (Sat, 12 Sep 2009) | 2 lines
Catch up with ACPICA 20090903.

r197107 | jkim | 2009-09-12 01:56:08 +0300 (Sat, 12 Sep 2009) | 2 lines
Canonify include paths for newly added files.

r197688 | jkim | 2009-10-01 23:56:15 +0300 (Thu, 01 Oct 2009) | 4 lines
Compile ACPI debugger and disassembler for kernel modules
unconditionally.
These files will generate almost empty object files without
ACPI_DEBUG/DDB
options. As a result, size of acpi.ko will increase slightly.

r198237 | jkim | 2009-10-19 19:12:58 +0300 (Mon, 19 Oct 2009) | 2 lines
Merge ACPICA 20091013.

r199337 | jkim | 2009-11-16 23:47:12 +0200 (Mon, 16 Nov 2009) | 2 lines
Merge ACPICA 20091112.

r199338 | jkim | 2009-11-16 23:53:56 +0200 (Mon, 16 Nov 2009) | 2 lines
Add a forgotten module Makefile change from the previous commit.

r200553 | jkim | 2009-12-15 00:24:04 +0200 (Tue, 15 Dec 2009) | 2 lines
Merge ACPICA 20091214.

r200554 | jkim | 2009-12-15 00:28:32 +0200 (Tue, 15 Dec 2009) | 3 lines
Remove _FDE quirk handling as these quirks are automatically repaired
by ACPICA layer since ACPICA 20091214.

r202771 | jkim | 2010-01-21 23:14:28 +0200 (Thu, 21 Jan 2010) | 2 lines
Merge ACPICA 20100121.

r202773 | jkim | 2010-01-21 23:31:39 +0200 (Thu, 21 Jan 2010) | 2 lines
Fix a new header inclusion.

Discussed with: jkim, jhb
No objections from: acpi@


# 9ad4b9fb 29-Oct-2009 John Baldwin <jhb@FreeBSD.org>

MFC 197648:
Split the 'video' ACPI lock up into two locks to resolve a LOR with the
sysctl lock. The 'video' lock now protects the 'bus' of video output
devices attached to a graphics adapter. It is used when iterating over
the list of outputs, etc. The 'video_output' lock is used to lock the
output-specific data similar to a driver lock for the individual video
outputs.


# 0032eb1a 30-Sep-2009 John Baldwin <jhb@FreeBSD.org>

Split the 'video' ACPI lock up into two locks to resolve a LOR with the
sysctl lock. The 'video' lock now protects the 'bus' of video output
devices attached to a graphics adapter. It is used when iterating over
the list of outputs, etc. The 'video_output' lock is used to lock the
output-specific data similar to a driver lock for the individual video
outputs.

MFC after: 2 weeks


# 36a888a1 23-Sep-2009 John Baldwin <jhb@FreeBSD.org>

Uninline an instance of STAILQ_FOREACH_SAFE().


# 129d3046 05-Jun-2009 Jung-uk Kim <jkim@FreeBSD.org>

Import ACPICA 20090521.


# aaac7452 02-Jun-2009 Jung-uk Kim <jkim@FreeBSD.org>

Chase ACPICA API changes (for kernel and boot loader).


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 48411a17 10-Aug-2006 Bruno Ducrot <bruno@FreeBSD.org>

Improve the way we'll detect video devices as per ACPI 3.0.

PR: 100271
Requested by: john AT utzweb DOT net
Submitted by: hrs
Reviewed by: njl
Approved by: njl
MFC after: 3 days


# a1ee13ef 20-Dec-2005 John Baldwin <jhb@FreeBSD.org>

Attach to the vgapci device rather than pci.


# 2a191126 11-Sep-2005 David E. O'Brien <obrien@FreeBSD.org>

Canonize the include of acpi.h.


# dad97fee 02-Mar-2005 David E. O'Brien <obrien@FreeBSD.org>

Fix SCM ID's.


# cbd88606 08-Nov-2004 Nate Lawson <njl@FreeBSD.org>

Tell the BIOS we want to handle brightness switching as well as output
switching. Don't initialize variables in their declaration. Reduce stack
usage for device names. Minor style cleanups.

MFC after: 1 week


# 5bfe5826 13-Aug-2004 Nate Lawson <njl@FreeBSD.org>

MPSAFE locking

* Serialize operations in acpi_video_bind_outputs(), acpi_video_detach(),
acpi_video_notify_handler(), acpi_video_power_profile(), and the sysctls.
The main goal is to protect the shared device list and prevent conflicting
settings.
* Add assertions that the sx lock is held in the leaf functions.


# 6b332272 24-Jul-2004 Nate Lawson <njl@FreeBSD.org>

Fix a bug where an item was being removed from a list without using
FOREACH_SAFE. Remove bad cast of retp and instead use an additional
arg to pass back the number of valid outputs. Use the package convenience
functions for parsing packages.


# c8f3591b 21-Jul-2004 Nate Lawson <njl@FreeBSD.org>

Remove unused (and bogus) locking, style cleanup, remove unnecessary casts.


# 7051c84d 16-Jul-2004 Nate Lawson <njl@FreeBSD.org>

Fix acpi_video loading. When we started cleaning up the duplicate handles
left around after the PCI probe, acpi_video stopped attaching because while
it was an acpi child device, it really is a PCI device. Fix this by making
it a PCI child.

* Remove non-handle ivars accesses since child busses only implement
acpi_get_handle().
* Access the acpi softc directly through the devclass instead of through
the implied parent.
* Clean up a potential panic on unload by freeing the sysctl context before
storing NULL in the OID.

Found by: marks


# fe12f24b 30-May-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Add missing <sys/module.h> includes


# a4ecd543 08-Apr-2004 Nate Lawson <njl@FreeBSD.org>

Unify on version 1 to be similar to the rest of the tree. After 5-stable
branches, increment version on any API change visible to other modules.


# c310653e 03-Mar-2004 Nate Lawson <njl@FreeBSD.org>

Change to acpi_{Get,Set}Integer to provide both methods. Convert all
callers to the new API.

Submitted by: Mark Santcroos <marks@ripe.net>


# c58375c3 01-Mar-2004 Nate Lawson <njl@FreeBSD.org>

Add the ACPI standard video extensions driver. I've done some style cleanup
but a bit more reamins to be done. For now, it is usable.

Submitted by: Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>