search for: nvif_rd32

Displaying 20 results from an estimated 49 matches for "nvif_rd32".

Did you mean: nv_rd32
2018 Feb 19
1
[PATCH v2] bl: fix backlight regression
...d) struct nouveau_encoder *nv_encoder = bl_get_data(bd); struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); struct nvif_object *device = &drm->client.device.object; - int or = nv_encoder->or; + int or = ffs(nv_encoder->dcb->or) - 1; u32 div, val; div = nvif_rd32(device, NV50_PDISP_SOR_PWM_DIV(or)); @@ -188,7 +188,7 @@ nva3_set_intensity(struct backlight_device *bd) struct nouveau_encoder *nv_encoder = bl_get_data(bd); struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); struct nvif_object *device = &drm->client.device.object; -...
2016 Sep 16
2
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
...), 1 deletion(-) > > diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c > index 5e28b5f..1f731da 100644 > --- a/drm/nouveau/nouveau_led.c > +++ b/drm/nouveau/nouveau_led.c > @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) > div = nvif_rd32(device, 0x61c880) & 0x00ffffff; > duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; > > - return duty * LED_FULL / div; > + if (div > 0) > + return duty * LED_FULL / div; > + else > + return 0; minor nitpick: you...
2017 Jul 03
2
[PATCH] disp/gf119-: avoid creating non-existent heads
...au/nv50_display.c index e3132a2c..e2170efb 100644 --- a/drm/nouveau/nv50_display.c +++ b/drm/nouveau/nv50_display.c @@ -4443,11 +4443,13 @@ nv50_display_create(struct drm_device *dev) /* create crtc objects to represent the hw heads */ if (disp->disp->oclass >= GF110_DISP) - crtcs = nvif_rd32(&device->object, 0x022448); + crtcs = nvif_rd32(&device->object, 0x612004) & 0xf; else - crtcs = 2; + crtcs = 0x3; - for (i = 0; i < crtcs; i++) { + for (i = 0; i < fls(crtcs); i++) { + if (!(crtcs & (1 << i))) + continue; ret = nv50_head_create(dev, i...
2016 Sep 16
7
[PATCH 1/3] drm/nouveau/led: don't access led subdev if it wasn't initialized
From: Karol Herbst <karolherbst at gmail.com> Fixes a kernel crash on suspend/resume. --- drm/nouveau/nouveau_led.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 9eed5a6..5e28b5f 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -107,7 +107,8 @@ nouveau_led_suspend(struct
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
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 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:
2016 Sep 16
0
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
...5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 5e28b5f..1f731da 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) div = nvif_rd32(device, 0x61c880) & 0x00ffffff; duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; - return duty * LED_FULL / div; + if (div > 0) + return duty * LED_FULL / div; + else + return 0; } static void -- 2.8.0
2016 Sep 16
0
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
...;> diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c >> index 5e28b5f..1f731da 100644 >> --- a/drm/nouveau/nouveau_led.c >> +++ b/drm/nouveau/nouveau_led.c >> @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led) >> div = nvif_rd32(device, 0x61c880) & 0x00ffffff; >> duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; >> >> - return duty * LED_FULL / div; >> + if (div > 0) >> + return duty * LED_FULL / div; >> + else >> + r...
2020 Jun 14
1
[PATCH] drm/noveau: fix reference count leak in nouveau_debugfs_strap_peek
...ruct seq_file *m, void *data) int ret; ret = pm_runtime_get_sync(drm->dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(drm->dev->dev); return ret; + } seq_printf(m, "0x%08x\n", nvif_rd32(&drm->client.device.object, 0x101000)); -- 2.25.1
2015 Mar 30
0
[Bug 82714] [G84] nouveau fails to properly initialize GPU
...t; Created attachment 114735 [details] > 4.0-rc6 dmesg of nouveau loading (debug, runpm=0) The first BUG happens in evo_wait() at line 420 of nv50_display.c Seems like dmac->ptr[put] is bad. 413: evo_wait(void *evoc, int nr) 414: { 415: struct nv50_dmac *dmac = evoc; 416: u32 put = nvif_rd32(&dmac->base.user, 0x0000) / 4; 417: 418: mutex_lock(&dmac->lock); 419: if (put + nr >= (PAGE_SIZE / 4) - 8) { 420: dmac->ptr[put] = 0x20000000; 421: 422: nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); 423: if (!nvxx_wait(&dmac->bas...
2017 Jul 03
0
[PATCH] disp/gf119-: avoid creating non-existent heads
...2170efb 100644 > --- a/drm/nouveau/nv50_display.c > +++ b/drm/nouveau/nv50_display.c > @@ -4443,11 +4443,13 @@ nv50_display_create(struct drm_device *dev) > > /* create crtc objects to represent the hw heads */ > if (disp->disp->oclass >= GF110_DISP) > - crtcs = nvif_rd32(&device->object, 0x022448); > + crtcs = nvif_rd32(&device->object, 0x612004) & 0xf; > else > - crtcs = 2; > + crtcs = 0x3; > > - for (i = 0; i < crtcs; i++) { > + for (i = 0; i < fls(crtcs); i++) { > + if (!(crtcs & (1 << i))) > +...
2016 Aug 22
10
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...ic enum led_brightness +nouveau_led_get_brightness(struct led_classdev *led) +{ + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; + struct nouveau_drm *drm = nouveau_drm(drm_dev); + struct nvif_object *device = &drm->device.object; + u32 div, duty; + + div = nvif_rd32(device, 0x61c880) & 0x00ffffff; + duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; + + return duty * LED_FULL / div; +} + +static void +nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) +{ + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led...
2010 Oct 26
22
[Bug 31122] New: Cannot control backlight intensity on Powerbook
https://bugs.freedesktop.org/show_bug.cgi?id=31122 Summary: Cannot control backlight intensity on Powerbook Product: xorg Version: unspecified Platform: PowerPC OS/Version: Linux (All) Status: NEW Severity: enhancement Priority: medium Component: Driver/nouveau AssignedTo: nouveau at
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
2016 Aug 23
1
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...> + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; >> + struct nouveau_drm *drm = nouveau_drm(drm_dev); >> + struct nvif_object *device = &drm->device.object; >> + u32 div, duty; >> + >> + div = nvif_rd32(device, 0x61c880) & 0x00ffffff; >> + duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; >> + >> + return duty * LED_FULL / div; >> +} >> + >> +static void >> +nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value)...
2023 Mar 26
1
[PATCH 6.2 regression fix] drm/nouveau/kms: Fix backlight registration
...truct nouveau_backlight *bl, struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); struct nvif_object *device = &drm->client.device.object; + /* + * Note when this runs the connectors have not been probed yet, + * so nv_conn->base.status is not set yet. + */ if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(ffs(nv_encoder->dcb->or) - 1)) || - nv_conn->base.status != connector_status_connected) + drm_helper_probe_detect(&nv_conn->base, NULL, false) != connector_status_connected) return -ENODEV; if (nv_conn->type == DCB_CONNECTOR_eDP) { --...
2023 Mar 28
1
[PATCH 6.2 regression fix] drm/nouveau/kms: Fix backlight registration
...ct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); > struct nvif_object *device = &drm->client.device.object; > > + /* > + * Note when this runs the connectors have not been probed yet, > + * so nv_conn->base.status is not set yet. > + */ > if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(ffs(nv_encoder->dcb->or) - 1)) || > - nv_conn->base.status != connector_status_connected) > + drm_helper_probe_detect(&nv_conn->base, NULL, false) != connector_status_connected) > return -ENODEV; > > if (nv_conn->type =...
2016 Apr 15
11
[PATCH 1/2] nouveau/bl: Assign different names to interfaces
...atic int nv40_get_intensity(struct backlight_device *bd) { @@ -74,6 +78,7 @@ nv40_backlight_init(struct drm_connector *connector) struct nvif_object *device = &drm->device.object; struct backlight_properties props; struct backlight_device *bd; + char* backlight_name = NULL; if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK)) return 0; @@ -81,8 +86,14 @@ nv40_backlight_init(struct drm_connector *connector) memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = 31; - bd = backlight_device_register(...