<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/gpu/drm/gma500/backlight.c, branch docs-fixes</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2025-10-31T08:34:52+00:00</updated>
<entry>
<title>drm: include drm_print.h where needed</title>
<updated>2025-10-31T08:34:52+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2025-10-29T10:39:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f6e8dc9edf963dbc99085e54f6ced6da9daa6100'/>
<id>urn:sha1:f6e8dc9edf963dbc99085e54f6ced6da9daa6100</id>
<content type='text'>
There are a gazillion files that depend on drm_print.h being indirectly
included via drm_buddy.h, drm_mm.h, or ttm/ttm_resource.h. In
preparation for removing those includes, explicitly include drm_print.h
where needed.

Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://lore.kernel.org/r/5fe67395907be33eb5199ea6d540e29fddee71c8.1761734313.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm: Include &lt;linux/backlight.h&gt; where needed</title>
<updated>2023-01-13T12:13:57+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-11T13:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a6276e92a037fc2dc888189a97e2b47887160016'/>
<id>urn:sha1:a6276e92a037fc2dc888189a97e2b47887160016</id>
<content type='text'>
Include &lt;linux/backlight.h&gt; in source files that need it. Some of
DRM's source code gets the backlight header via drm_crtc_helper.h
and &lt;linux/fb.h&gt;, which can leed to unnecessary recompilation. If
possible, do not include drm_crtc_helper.h any longer.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt; # amd
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/gma500: Don't register backlight when another backlight should be used</title>
<updated>2022-09-18T19:03:17+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-09-17T20:59:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a7b98d4dfe68654641d56cdc7eace2c36be93a2d'/>
<id>urn:sha1:a7b98d4dfe68654641d56cdc7eace2c36be93a2d</id>
<content type='text'>
Before this commit when we want userspace to use the acpi_video backlight
device we register both the GPU's native backlight device and acpi_video's
firmware acpi_video# backlight device. This relies on userspace preferring
firmware type backlight devices over native ones.

Registering 2 backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-5-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>drm/gma500: Use backlight_get_brightness() to get the brightness</title>
<updated>2022-09-18T19:03:10+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-09-17T20:59:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fbf3093466d05461e3f307ffe6b1150daa4b065b'/>
<id>urn:sha1:fbf3093466d05461e3f307ffe6b1150daa4b065b</id>
<content type='text'>
Use backlight_get_brightness() instead of directly referencing
bd-&gt;props.brightness. This will take backlight_is_blank() into account,
properly setting brightness to 0 when screen-blanking has been requested
through the backlight sysfs interface.

Suggested-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-4-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>drm/gma500: Change registered backlight device type to raw/native</title>
<updated>2022-09-18T19:03:06+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-09-17T20:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dec4ddbe1d4a4414092309611cc97e6b9dc7ec3f'/>
<id>urn:sha1:dec4ddbe1d4a4414092309611cc97e6b9dc7ec3f</id>
<content type='text'>
Change the type for the registered backlight class device from platform
to raw/native.

The poulsbo/cedarview/oaktrail backlight support is using native GPU
backlight control and as such the type should be raw (aka native) as
is done by all the other native GPU backlight driver code.

Note this will not change much from userspace's point of view.
poulsbo/cedarview laptops typically offer both an ACPI-video
backlight interface as well as the native GPU backlight interface.

The /sys/class/backlight/acpi_video0 has a type of firmware and
userspace typically looks for firmware devices before looking
for platform devices. The typical standard lookup order is:
firmware -&gt; platform -&gt; raw

This means that both before and after this change typical userspace
backlight consumers (sich as e.g. GNOME) will prefer the firmware
acpi_video0 backlight device.

This has been tested on a Packard Bell Dot SC (Intel Atom N2600, cedarview)
and a Sony Vaio vpc-x11s1e (Intel N540, poulsbo) laptop.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-3-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>drm/gma500: Refactor backlight support (v2)</title>
<updated>2022-09-18T19:02:52+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2022-09-17T20:59:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1f90b1232773249d924868bec3c31525a69fd482'/>
<id>urn:sha1:1f90b1232773249d924868bec3c31525a69fd482</id>
<content type='text'>
Refactor backlight support so that the gma_backlight_enable() /
gma_backlight_disable() / gma_backlight_set() functions used by
the Opregion handle will also work if no backlight_device gets
registered.

This is a preparation patch for not registering the gma500's own backlight
device when acpi_video should be used, since registering 2 backlight
devices for a single display really is undesirable.

Since the acpi-video interface often uses the OpRegion we need to keep
the OpRegion functional even when dev_priv-&gt;backlight_device is NULL.

As a result of this refactor the actual backlight_device_register()
call is moved to the shared backlight.c code and all #ifdefs related to
CONFIG_BACKLIGHT_CLASS_DEVICE are now also limited to backlight.c .

No functional changes intended.

This has been tested on a Packard Bell Dot SC (Intel Atom N2600, cedarview)
and a Sony Vaio vpc-x11s1e (Intel N540, poulsbo) laptop.

Changes in v2:
- Fix unused variable warnings when CONFIG_BACKLIGHT is not selected by
  marking the 2 variables as  __maybe_unused.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-2-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>drm/gma500: Replace references to dev_private with helper function</title>
<updated>2021-09-23T07:40:20+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-09-20T14:10:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f71635e893c3832790484f2e22b8d5825cc6ce1c'/>
<id>urn:sha1:f71635e893c3832790484f2e22b8d5825cc6ce1c</id>
<content type='text'>
Replace most references to struct drm_device.dev_private with the new
helper function to_drm_psb_private(). The only references left are in
assignments and the helper itself.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/gma500: remove trailing whitespaces</title>
<updated>2021-04-21T23:11:39+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@canonical.com</email>
</author>
<published>2021-04-19T08:18:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1ce1af845450de5c231adb42161c14a8e87d1bdd'/>
<id>urn:sha1:1ce1af845450de5c231adb42161c14a8e87d1bdd</id>
<content type='text'>
Remove trailing whitespaces.  No functional change.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-2-krzysztof.kozlowski@canonical.com
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335</title>
<updated>2019-06-05T15:37:06+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T23:57:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a61127c2130236168321cc76c5a58e15c00ad154'/>
<id>urn:sha1:a61127c2130236168321cc76c5a58e15c00ad154</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms and conditions of the gnu general public license
  version 2 as published by the free software foundation this program
  is distributed in the hope it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 51 franklin st fifth floor boston ma 02110
  1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 111 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.567572064@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/gpu/drm/gma500/backlight.c: fix a defined-but-not-used warning for do_gma_backlight_set()</title>
<updated>2014-01-24T00:36:55+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-01-23T23:54:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e13e64ece037104f5b04d0e98929ad2149c5bb09'/>
<id>urn:sha1:e13e64ece037104f5b04d0e98929ad2149c5bb09</id>
<content type='text'>
Fix the following warning:

	drivers/gpu/drm/gma500/backlight.c:29:13: warning: 'do_gma_backlight_set' defined but not used [-Wunused-function]

by moving the entire function inside the conditional section currently
inside of it.  All the places that call it are so conditionalised.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
