search for: nvif_mthd

Displaying 20 results from an estimated 58 matches for "nvif_mthd".

2017 Jul 12
1
[PATCH] drm/nouveau: honor return type of nvif_mthd, trivial
nvif_mthd() returns an int, so provide that for return checking Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/...
2015 Feb 15
2
Only stereo sound with gtx570 over hdmi (regression)
...d.hashm = nv_encoder->dcb->hashm, }; nv_connector = nouveau_encoder_connector_get(nv_encoder); @@ -1671,7 +1673,7 @@ drm_edid_to_eld(&nv_connector->base, nv_connector->edid); memcpy(args.data, nv_connector->base.eld, sizeof(args.data)); - nvif_mthd(disp->disp, 0, &args, sizeof(args)); + nvif_mthd(disp->disp, 0, &args, sizeof(args.base) + args.data[2] * 4); } static void
2015 Jun 08
2
[PATCH RFC 05/20] pm: reorganize the nvif interface
...ct nvif_perfctr_v0), &object); > + NVIF_IOCTL_NEW_V0_PERFMON, NULL, 0, &object); > assert(ret == 0); > do { > u32 prev_iter = args.iter; > > args.name[0] = '\0'; > - ret = nvif_mthd(&object, NVIF_PERFCTR_V0_QUERY, &args, sizeof(args)); > + ret = nvif_mthd(&object, NVIF_PERFMON_V0_QUERY_SIGNAL, > + &args, sizeof(args)); > assert(ret == 0); > > if (prev_iter) { > @@ -663...
2015 Feb 17
1
Only stereo sound with gtx570 over hdmi (regression)
...what is the ELD?, is it the EDID?) Thanks --- drivers/gpu/drm/nouveau/nv50_display.c.orig 2015-02-15 20:04:10.583860698 +0100 +++ drivers/gpu/drm/nouveau/nv50_display.c 2015-02-15 20:46:43.518148777 +0100 @@ -1700,7 +1700,7 @@ memcpy(args.data, nv_connector->base.eld, sizeof(args.data)); nvif_mthd(disp->disp, 0, &args, - sizeof(args.base) + drm_eld_size(args.data)); + sizeof(args.base)); } static void -------------------------------------------- En date de : Mar 17.2.15, Ben Skeggs <skeggsb at gmail.com> a écrit : Objet: Re: [Nouveau] Only stereo sound with gtx570 o...
2015 Nov 09
5
[PATCH v2 0/5] move pstate interface to debugfs
I made a little changes in this series: 1. merge the two last patches together 2. unify the private data interface with the drm debugfs one now it should be very obvious for a new dev on how to add new files to debugfs and how to get access to the nouveau structs Karol Herbst (5): debugfs: add infrastructure to add files with other fops than only read debugfs: rename functions to
2020 Apr 16
1
[PATCH] drm/nouveau: Fix regression by audio component transition
...+ if (!nv_connector || !nv_crtc || nv_encoder->or != port || + nv_crtc->index != dev_id) continue; *enabled = drm_detect_monitor_audio(nv_connector->edid); if (*enabled) { @@ -599,7 +601,8 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc) nvif_mthd(&disp->disp->object, 0, &args, sizeof(args)); - nv50_audio_component_eld_notify(drm->audio.component, nv_crtc->index); + nv50_audio_component_eld_notify(drm->audio.component, nv_encoder->or, + nv_crtc->index); } static void @@ -633,7 +636,8 @@ nv50_audio_enabl...
2017 Jan 17
0
[PATCH 2/6] drm/nouveau: Pass mode-dependent AVI and Vendor HDMI InfoFrames to NVKM
.../drm_dp_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_plane_helper.h> +#include <drm/drm_edid.h> #include <nvif/class.h> #include <nvif/cl0002.h> @@ -2772,6 +2774,28 @@ nv50_hdmi_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc) nvif_mthd(disp->disp, 0, &args, sizeof(args)); } +static ssize_t +nv50_hdmi_pack_infoframe(struct nv50_disp_sor_hdmi_pwr_v0_infoframe *frame_out, + union hdmi_infoframe *frame_in) +{ + uint8_t buffer[17]; /* The header plus two "subpacks" */ + ssize_t len; + + len = hdmi_infoframe_pack...
2018 Jul 31
1
[PATCH] drm/nouveau: Fix potential memory access error in nouveau_debugfs_pstate_get()
...- struct nouveau_debugfs *debugfs = nouveau_debugfs(drm); + struct nouveau_debugfs *debugfs; struct nvif_object *ctrl = &debugfs->ctrl; struct nvif_control_pstate_info_v0 info = {}; int ret, i; - if (!debugfs) + if (!drm) return -ENODEV; + debugfs = nouveau_debugfs(drm); ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_INFO, &info, sizeof(info)); if (ret) -- 2.17.1
2020 Nov 14
0
[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks
...************************************************************************** @@ -725,11 +725,13 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc) (0x0100 << nv_crtc->index), }; - if (!nv_encoder->audio) - return; - - nv_encoder->audio = false; - nvif_mthd(&disp->disp->object, 0, &args, sizeof(args)); + mutex_lock(&drm->audio.lock); + if (nv_encoder->audio.enabled) { + nv_encoder->audio.enabled = false; + nv_encoder->audio.connector = NULL; + nvif_mthd(&disp->disp->object, 0, &args, sizeof(args)); + } +...
2014 Nov 10
1
[PATCH 2/2] drm/edid: fix Baseline_ELD_Len field in drm_edid_to_eld()
.../nv50_display.c > @@ -1680,7 +1680,8 @@ nv50_audio_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode) > drm_edid_to_eld(&nv_connector->base, nv_connector->edid); > memcpy(args.data, nv_connector->base.eld, sizeof(args.data)); > > - nvif_mthd(disp->disp, 0, &args, sizeof(args.base) + args.data[2] * 4); > + nvif_mthd(disp->disp, 0, &args, > + sizeof(args.base) + drm_eld_size(args.data); > } > > static void > -- > 2.1.1 > > _______________________________________________ &gt...
2016 Mar 21
0
[PATCH v2 22/22] debugfs: add boost interface to change the boost_mode
...uct seq_file *m, void *data) +{ + struct drm_info_node *node = (struct drm_info_node *) m->private; + struct nouveau_debugfs *debugfs = nouveau_debugfs(node->minor->dev); + struct nvif_object *ctrl = &debugfs->ctrl; + struct nvif_control_boost_info_v0 info = {}; + int ret; + + ret = nvif_mthd(ctrl, NVIF_CONTROL_BOOST_INFO, &info, sizeof(info)); + if (ret) + return ret; + + nouveau_debugfs_boost_get_entry(m, info.mode, 0, info.base_mhz); + nouveau_debugfs_boost_get_entry(m, info.mode, 1, info.boost_mhz); + nouveau_debugfs_boost_get_entry(m, info.mode, 2, info.max_mhz); + return 0; +...
2017 Nov 22
1
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
...eau/nouveau_debugfs.c > @@ -160,7 +160,11 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, > args.ustate = value; > } > > + ret = pm_runtime_get_sync(drm->dev); > + if (IS_ERR_VALUE(ret) && ret != -EACCES) > + return ret; > ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); > + pm_runtime_put_autosuspend(drm->dev); > if (ret < 0) > return ret; > >
2023 Apr 16
0
[PATCH 1/9] drm/nouveau/debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set()
...m); - struct nvif_object *ctrl = &debugfs->ctrl; struct nvif_control_pstate_user_v0 args = { .pwrsrc = -EINVAL }; char buf[32] = {}, *tmp, *cur = buf; long value, ret; @@ -188,7 +187,8 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, return ret; } - ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); + ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER, + &args, sizeof(args)); pm_runtime_put_autosuspend(drm->dev); if (ret < 0) return ret; -- 2.40.0
2015 Feb 16
0
Only stereo sound with gtx570 over hdmi (regression)
...hm, > }; > > nv_connector = nouveau_encoder_connector_get(nv_encoder); > @@ -1671,7 +1673,7 @@ > drm_edid_to_eld(&nv_connector->base, nv_connector->edid); > memcpy(args.data, nv_connector->base.eld, sizeof(args.data)); > > - nvif_mthd(disp->disp, 0, &args, sizeof(args)); > + nvif_mthd(disp->disp, 0, &args, sizeof(args.base) + args.data[2] * 4); > } > > static void > > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > h...
2015 Jun 07
21
[PATCH RFC 00/20] expose global performance counters
Hello, This series exposes global performance counters (PCOUNTER) to the userspace through the nvif interface by reworking most of the code related to the PM engine. This interface will allow the userspace to control and monitor complex hardware events like the proprietary driver already does, for example with CUPTI and PerfKit. For now, this series only exposes performance counters on NV50,
2020 Jan 13
0
[PATCH RESEND] drm/nouveau: Add HD-audio component notifier support
...{ + struct nouveau_drm *drm = nouveau_drm(encoder->dev); struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nv50_disp *disp = nv50_disp(encoder->dev); struct { @@ -496,11 +598,14 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc) }; nvif_mthd(&disp->disp->object, 0, &args, sizeof(args)); + + nv50_audio_component_eld_notify(drm->audio.component, nv_crtc->index); } static void nv50_audio_enable(struct drm_encoder *encoder, struct drm_display_mode *mode) { + struct nouveau_drm *drm = nouveau_drm(encoder->dev);...
2023 Apr 16
10
[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
Date: Sun, 16 Apr 2023 11:22:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (9): debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set() debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get() debugfs: Use seq_putc() in
2017 Apr 23
0
[PATCH] drm/nouveau/kms: Increase max retries in scanout position queries.
...@@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, }; struct nouveau_display *disp = nouveau_display(crtc->dev); struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)]; - int ret, retry = 1; + int ret, retry = 20; do { ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args)); -- 2.7.4
2017 Nov 17
0
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
...nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -160,7 +160,11 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, args.ustate = value; } + ret = pm_runtime_get_sync(drm->dev); + if (IS_ERR_VALUE(ret) && ret != -EACCES) + return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); + pm_runtime_put_autosuspend(drm->dev); if (ret < 0) return ret; -- 2.15.0
2018 Jul 14
2
[PATCH 0/2] Some minor reclocking fixes
First patch fixes a potential vbios parsing bug on Fermi GPUs, but it may also affect Kepler ones. Second patch wakes the GPU up whenever the user tries to reclock to prevent the write to the pstate file from freezing. Karol Herbst (2): bios/vpstate: There are some fermi vbios with no boost or tdp entry debugfs: Wake up GPU before doing any reclocking drm/nouveau/nouveau_debugfs.c