Displaying 16 results from an estimated 16 matches for "bl_ida".
2016 Nov 13
1
[PATCH v3 1/2] nouveau/bl: Assign different names to interfaces
...u/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -31,11 +31,32 @@
*/
#include <linux/backlight.h>
+#include <linux/idr.h>
#include "nouveau_drv.h"
#include "nouveau_reg.h"
#include "nouveau_encoder.h"
+static struct ida bl_ida;
+#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
+
+struct backlight_connector {
+ struct list_head head;
+ int id;
+};
+
+static void
+nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], struct
+ backlight_connector *connector)
+{
+ const int nb = ida_simple_...
2016 Apr 15
11
[PATCH 1/2] nouveau/bl: Assign different names to interfaces
Currently, every backlight interface created by Nouveau uses the same name,
nv_backlight. This leads to a sysfs warning as it tries to create an already
existing folder. This patch adds a incremented number to the name, but keeps
the initial name as nv_backlight, to avoid possibly breaking userspace; the
second interface will be named nv_backlight1, and so on.
Fixes: fdo#86539
Signed-off-by:
2016 Apr 17
0
[PATCH v2 1/2] nouveau/bl: Assign different names to interfaces
...a/drm/nouveau/nouveau_backlight.c
+++ b/drm/nouveau/nouveau_backlight.c
@@ -31,11 +31,31 @@
*/
#include <linux/backlight.h>
+#include <linux/idr.h>
#include "nouveau_drm.h"
#include "nouveau_reg.h"
#include "nouveau_encoder.h"
+static struct ida bl_ida;
+
+struct backlight_connector {
+ struct list_head head;
+ int id;
+};
+
+static void
+nouveau_get_backlight_name(char backlight_name[15], struct backlight_connector
+ *connector)
+{
+ const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL);
+ if (nb > 0 && nb < 100)
+ sprintf...
2016 Dec 07
0
[PATCH v4 1/2] nouveau/bl: Assign different names to interfaces
...a/drm/nouveau/nouveau_backlight.c
+++ b/drm/nouveau/nouveau_backlight.c
@@ -31,11 +31,35 @@
*/
#include <linux/backlight.h>
+#include <linux/idr.h>
#include "nouveau_drv.h"
#include "nouveau_reg.h"
#include "nouveau_encoder.h"
+static struct ida bl_ida;
+#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
+
+struct backlight_connector {
+ struct list_head head;
+ int id;
+};
+
+static bool
+nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], struct backlight_connector
+ *connector)
+{
+ const int nb = ida_simple_...
2016 Nov 14
0
[PATCH v3 1/2] nouveau/bl: Assign different names to interfaces
...veau_backlight.c
> @@ -31,11 +31,32 @@
> */
>
> #include <linux/backlight.h>
> +#include <linux/idr.h>
>
> #include "nouveau_drv.h"
> #include "nouveau_reg.h"
> #include "nouveau_encoder.h"
>
> +static struct ida bl_ida;
> +#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
> +
> +struct backlight_connector {
> + struct list_head head;
> + int id;
> +};
> +
> +static void
> +nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE], struct
> + backlight_con...
2018 Aug 23
1
[PATCH 1/5] drm/nouveau: Check backlight IDs are >= 0, not > 0
...init(struct drm_connector *connector)
> &nv40_bl_ops, &props);
>
> if (IS_ERR(bd)) {
> - if (bl_connector.id > 0)
> + if (bl_connector.id >= 0)
> ida_simple_remove(&bl_ida, bl_connector.id);
> return PTR_ERR(bd);
> }
> @@ -249,7 +249,7 @@ nv50_backlight_init(struct drm_connector *connector)
> nv_encoder, ops, &props);
>
> if (IS_ERR(bd)) {
> - if (bl_connecto...
2018 Jul 05
4
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
If have a couple patches I found while looking at a panic
I was seeing while unloading the nouveau module.
Unloading the nouveau module on my optimus notebook machine causes
the system to panic. This started occuring when moving from 4.4
to 4.14.
These patches make it such that the system does not panic
when unloading the module.
4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon:
2018 Aug 23
6
[PATCH 0/5] drm/nouveau: Backlight fixes and cleanup
This series fixes some issues with nouveau's backlight support that were
causing kernel panics on module reloads, specifically on systems with
nouveau handling the backlight of one of the displays.
While we're at it, let's cleanup nouveau_backlight.c as well
Lyude Paul (5):
drm/nouveau: Check backlight IDs are >= 0, not > 0
drm/nouveau: Move backlight device into
2018 Aug 29
5
[PATCH v2 0/5] drm/nouveau: Backlight fixes and cleanup
Next version of https://patchwork.freedesktop.org/series/48596/ . Made
some important changes to the refactoring patch, but everything else is
the same.
Lyude Paul (5):
drm/nouveau: Check backlight IDs are >= 0, not > 0
drm/nouveau: Move backlight device into nouveau_connector
drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/
drm/nouveau: Cleanup indenting in
2018 Aug 29
6
[PATCH RESEND v3 0/6] drm/nouveau: Backlight fixes and cleanup
Forgot to send 6 patches instead of five since there's one new one now,
whoops!
No actual changes, next version of
https://patchwork.freedesktop.org/series/48596/
Lyude Paul (6):
drm/nouveau: Check backlight IDs are >= 0, not > 0
drm/nouveau: Add NV_PRINTK_ONCE and variants
drm/nouveau: Move backlight device into nouveau_connector
drm/nouveau:
2018 Sep 06
7
[PATCH v4 0/6] Backlight fixes and cleanup
Refactor for Ben, hopefully this time this should apply to his tree.
Next version of https://patchwork.freedesktop.org/series/48596/
No changes otherwise.
Lyude Paul (6):
drm/nouveau: Check backlight IDs are >= 0, not > 0
drm/nouveau: Add NV_PRINTK_ONCE and variants
drm/nouveau: Move backlight device into nouveau_connector
drm/nouveau:
2018 Aug 29
5
[PATCH v3 0/5] drm/nouveau: Backlight fixes and cleanup
Next version of https://patchwork.freedesktop.org/series/48596/ . Added
NV_INFO_ONCE and made "Move backlight device into nouveau_connector" use
that instead so we don't print the GMUX warning more then once.
Lyude Paul (5):
drm/nouveau: Add NV_PRINTK_ONCE and variants
drm/nouveau: Move backlight device into nouveau_connector
drm/nouveau:
2018 Aug 23
0
[PATCH 1/5] drm/nouveau: Check backlight IDs are >= 0, not > 0
...u/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -116,7 +116,7 @@ nv40_backlight_init(struct drm_connector *connector)
&nv40_bl_ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);
return PTR_ERR(bd);
}
@@ -249,7 +249,7 @@ nv50_backlight_init(struct drm_connector *connector)
nv_encoder, ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);...
2018 Aug 29
0
[PATCH v2 1/5] drm/nouveau: Check backlight IDs are >= 0, not > 0
...u/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -116,7 +116,7 @@ nv40_backlight_init(struct drm_connector *connector)
&nv40_bl_ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);
return PTR_ERR(bd);
}
@@ -249,7 +249,7 @@ nv50_backlight_init(struct drm_connector *connector)
nv_encoder, ops, &props);
if (IS_ERR(bd)) {
- if (bl_connector.id > 0)
+ if (bl_connector.id >= 0)
ida_simple_remove(&bl_ida, bl_connector.id);...
2018 Feb 16
0
[PATCH] bl: fix backlight regression
...t.c b/drm/nouveau/nouveau_backlight.c
index 380f3402..057708da 100644
--- a/drm/nouveau/nouveau_backlight.c
+++ b/drm/nouveau/nouveau_backlight.c
@@ -38,6 +38,8 @@
#include "nouveau_reg.h"
#include "nouveau_encoder.h"
+#include "nv50_display.h"
+
static struct ida bl_ida;
#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
@@ -220,6 +222,7 @@ nv50_backlight_init(struct drm_connector *connector)
const struct backlight_ops *ops;
struct backlight_connector bl_connector;
char backlight_name[BL_NAME_SIZE];
+ int ret;
nv_encoder = find...
2024 May 23
4
[PATCH 0/4] drm: enable -Wformat-truncation
Jani Nikula (4):
drm/amdgpu: fix -Wformat-truncation warning in
amdgpu_gfx_kiq_init_ring()
drm/nouveau: fix -Wformat-truncation warning in
nouveau_backlight_init()
drm/imx: fix -Wformat-truncation warning in imx_ldb_probe()
drm: enable -Wformat-truncation across the subsystem
drivers/gpu/drm/Makefile | 3 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6