Patch "drm/i915: hide unused intel_panel_set_backlight function" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/i915: hide unused intel_panel_set_backlight function

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-hide-unused-intel_panel_set_backlight-function.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Fri Feb 23 16:40:21 CET 2018
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Mon, 19 Feb 2018 11:13:21 +0100
Subject: drm/i915: hide unused intel_panel_set_backlight function
To: stable@xxxxxxxxxxxxxxx
Cc: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx>, Daniel Vetter <daniel.vetter@xxxxxxxx>, Daniel Vetter <daniel.vetter@xxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <20180219101343.2922561-3-arnd@xxxxxxxx>

From: Arnd Bergmann <arnd@xxxxxxxx>

commit fd94d53e55bd487368dfee9f1af24da78b2bb582 upstream.

Building i915 without backlight support results in a harmless warning
for intel_panel_set_backlight:

drivers/gpu/drm/i915/intel_panel.c:653:13: error: 'intel_panel_set_backlight' defined but not used [-Werror=unused-function]

This moves it into the CONFIG_BACKLIGHT_CLASS_DEVICE section that
its caller is in.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
Link: https://patchwork.freedesktop.org/patch/msgid/20171127151239.1813673-2-arnd@xxxxxxxx
[arnd: manually rebased to 4.9]
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_panel.c |   86 ++++++++++++++++++-------------------
 1 file changed, 43 insertions(+), 43 deletions(-)

--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -544,25 +544,6 @@ static u32 pwm_get_backlight(struct inte
 	return DIV_ROUND_UP(duty_ns * 100, CRC_PMIC_PWM_PERIOD_NS);
 }
 
-static u32 intel_panel_get_backlight(struct intel_connector *connector)
-{
-	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-	struct intel_panel *panel = &connector->panel;
-	u32 val = 0;
-
-	mutex_lock(&dev_priv->backlight_lock);
-
-	if (panel->backlight.enabled) {
-		val = panel->backlight.get(connector);
-		val = intel_panel_compute_brightness(connector, val);
-	}
-
-	mutex_unlock(&dev_priv->backlight_lock);
-
-	DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
-	return val;
-}
-
 static void lpt_set_backlight(struct intel_connector *connector, u32 level)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
@@ -646,30 +627,6 @@ intel_panel_actually_set_backlight(struc
 	panel->backlight.set(connector, level);
 }
 
-/* set backlight brightness to level in range [0..max], scaling wrt hw min */
-static void intel_panel_set_backlight(struct intel_connector *connector,
-				      u32 user_level, u32 user_max)
-{
-	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-	struct intel_panel *panel = &connector->panel;
-	u32 hw_level;
-
-	if (!panel->backlight.present)
-		return;
-
-	mutex_lock(&dev_priv->backlight_lock);
-
-	WARN_ON(panel->backlight.max == 0);
-
-	hw_level = scale_user_to_hw(connector, user_level, user_max);
-	panel->backlight.level = hw_level;
-
-	if (panel->backlight.enabled)
-		intel_panel_actually_set_backlight(connector, hw_level);
-
-	mutex_unlock(&dev_priv->backlight_lock);
-}
-
 /* set backlight brightness to level in range [0..max], assuming hw min is
  * respected.
  */
@@ -1122,6 +1079,49 @@ void intel_panel_enable_backlight(struct
 }
 
 #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
+static u32 intel_panel_get_backlight(struct intel_connector *connector)
+{
+	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+	struct intel_panel *panel = &connector->panel;
+	u32 val = 0;
+
+	mutex_lock(&dev_priv->backlight_lock);
+
+	if (panel->backlight.enabled) {
+		val = panel->backlight.get(connector);
+		val = intel_panel_compute_brightness(connector, val);
+	}
+
+	mutex_unlock(&dev_priv->backlight_lock);
+
+	DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
+	return val;
+}
+
+/* set backlight brightness to level in range [0..max], scaling wrt hw min */
+static void intel_panel_set_backlight(struct intel_connector *connector,
+				      u32 user_level, u32 user_max)
+{
+	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+	struct intel_panel *panel = &connector->panel;
+	u32 hw_level;
+
+	if (!panel->backlight.present)
+		return;
+
+	mutex_lock(&dev_priv->backlight_lock);
+
+	WARN_ON(panel->backlight.max == 0);
+
+	hw_level = scale_user_to_hw(connector, user_level, user_max);
+	panel->backlight.level = hw_level;
+
+	if (panel->backlight.enabled)
+		intel_panel_actually_set_backlight(connector, hw_level);
+
+	mutex_unlock(&dev_priv->backlight_lock);
+}
+
 static int intel_backlight_device_update_status(struct backlight_device *bd)
 {
 	struct intel_connector *connector = bl_get_data(bd);


Patches currently in stable-queue which might be from arnd@xxxxxxxx are

queue-4.9/kasan-rework-kconfig-settings.patch
queue-4.9/tw5864-use-dev_warn-instead-of-warn-to-shut-up-warning.patch
queue-4.9/perf-x86-shut-up-false-positive-wmaybe-uninitialized-warning.patch
queue-4.9/go7007-add-media_camera_support-dependency.patch
queue-4.9/scsi-advansys-fix-build-warning-for-pci-n.patch
queue-4.9/video-fbdev-via-remove-possibly-unused-variables.patch
queue-4.9/drm-exynos-mark-pm-functions-as-__maybe_unused.patch
queue-4.9/binfmt_elf-compat-avoid-unused-function-warning.patch
queue-4.9/idle-i7300-add-pci-dependency.patch
queue-4.9/cw1200-fix-bogus-maybe-uninitialized-warning.patch
queue-4.9/x86-build-silence-the-build-with-make-s.patch
queue-4.9/gpio-xgene-mark-pm-functions-as-__maybe_unused.patch
queue-4.9/kvm-add-x86_local_apic-dependency.patch
queue-4.9/reiserfs-avoid-a-wmaybe-uninitialized-warning.patch
queue-4.9/scsi-advansys-fix-uninitialized-data-access.patch
queue-4.9/drm-i915-fix-intel_backlight_device_register-declaration.patch
queue-4.9/spi-bcm-qspi-shut-up-warning-about-cfi-header-inclusion.patch
queue-4.9/asoc-ux500-add-module_license-tag.patch
queue-4.9/x86-microcode-amd-change-load_microcode_amd-s-param-to-bool-to-fix-preemptibility-bug.patch
queue-4.9/video-fbdev-mmp-add-module_license.patch
queue-4.9/usb-phy-msm-add-regulator-dependency.patch
queue-4.9/arm64-dts-add-cooling-cells-to-cpu-nodes.patch
queue-4.9/vmxnet3-prevent-building-with-64k-pages.patch
queue-4.9/x86-platform-add-pci-dependency-for-punit_atom_debug.patch
queue-4.9/alsa-hda-ca0132-fix-possible-null-pointer-use.patch
queue-4.9/thermal-fix-intel_soc_dts_iosf_core-dependencies.patch
queue-4.9/arm64-define-bug-instruction-without-config_bug.patch
queue-4.9/arm64-sunxi-always-enable-reset-controller.patch
queue-4.9/tc358743-fix-register-i2c_rd-wr-functions.patch
queue-4.9/security-keys-big_key-requires-config_crypto.patch
queue-4.9/drm-i915-hide-unused-intel_panel_set_backlight-function.patch
queue-4.9/x86-fpu-math-emu-fix-possible-uninitialized-variable-use.patch
queue-4.9/arm-8743-1-bl_switcher-add-module_license-tag.patch
queue-4.9/em28xx-only-use-mt9v011-if-camera-support-is-enabled.patch
queue-4.9/arm64-fix-warning-about-swapper_pg_dir-overflow.patch
queue-4.9/shmem-avoid-maybe-uninitialized-warning.patch
queue-4.9/input-tca8418_keypad-hide-gcc-4.9-wmaybe-uninitialized-warning.patch
queue-4.9/drm-nouveau-hide-gcc-4.9-wmaybe-uninitialized.patch
queue-4.9/x86-add-multiuser-dependency-for-kvm.patch
queue-4.9/isdn-eicon-reduce-stack-size-of-sig_ind-function.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]