search for: drm_mode_duplicate

Displaying 20 results from an estimated 23 matches for "drm_mode_duplicate".

2023 Oct 07
1
[PATCH] drm/nouveau/dispnv04: fix a possible null pointer dereference
In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke <make_ruc2021 at 163.com> --- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/d...
2024 Jun 25
1
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
> In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate() is > assigned to mode, which will lead to a possible NULL pointer dereference > on failure of drm_mode_duplicate(). Add a check to avoid npd. Can a wording approach (like the following) be a better change description? A null pointer is stored in the local variable ?mode? after a call...
2024 Jun 26
1
[PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
On Wed, 26 Jun 2024, Ma Ke <make24 at iscas.ac.cn> wrote: > In nouveau_connector_get_modes(), the return value of drm_mode_duplicate() > is assigned to mode, which will lead to a possible NULL pointer > dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. > > Signed-off-by: Ma Ke <make24 at iscas.ac.cn> > --- > drivers/gpu/drm/nouveau/nouveau_connector.c | 2 ++ > 1 file changed,...
2023 Oct 13
1
[PATCH] drm/nouveau/dispnv04: fix a possible null pointer dereference
In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). The same applies to drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off-by: Ma Ke <make_ruc2021 at 163.com> --- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 4 ++++...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
> In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate() is > assigned to mode, which will lead to a possible NULL pointer dereference > on failure of drm_mode_duplicate(). The same applies to drm_cvt_mode(). > Add a check to avoid null pointer dereference. Can a wording approach (like the following) be a better change description? A null...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
Reviewed-by: Lyude Paul <lyude at redhat.com> On Tue, 2024-06-25 at 16:18 +0800, Ma Ke wrote: > In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate() > is > assigned to mode, which will lead to a possible NULL pointer > dereference > on failure of drm_mode_duplicate(). Add a check to avoid npd. > > Cc: stable at vger.kernel.org > Signed-off-by: Ma Ke <make24 at iscas.ac.cn> > --- > ?drivers/gpu/drm/nouveau/dis...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
Reviewed-by: Lyude Paul <lyude at redhat.com> I will push this and the other patch that you sent upstream in just a moment, thanks! On Tue, 2024-06-25 at 16:10 +0800, Ma Ke wrote: > In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate() > is > assigned to mode, which will lead to a possible NULL pointer > dereference > on failure of drm_mode_duplicate(). The same applies to > drm_cvt_mode(). > Add a check to avoid null pointer dereference. > > Cc: stable at vger.kernel.org > Signed-off-by: Ma Ke <m...
2024 Jun 26
0
[PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
> In nouveau_connector_get_modes(), the return value of drm_mode_duplicate() > is assigned to mode, which will lead to a possible NULL pointer > dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. 1. Can a wording approach (like the following) be a better change description? A null pointer is stored in the local variable ?mode? after a cal...
2020 Feb 25
2
[PATCH 04/12] drm: Nuke mode->vrefresh
...panel-boe-himax8279d.c > > index 74d58ee7d04c..7c27bd5e3486 100644 > > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c > > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > > @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, > > mode = drm_mode_duplicate(connector->dev, m); > > if (!mode) { > > DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", > > - m->hdisplay, m->vdisplay, m->vrefresh); > > + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); > > retu...
2020 Feb 24
0
[PATCH 04/12] drm: Nuke mode->vrefresh
...b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > index 74d58ee7d04c..7c27bd5e3486 100644 > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, > mode = drm_mode_duplicate(connector->dev, m); > if (!mode) { > DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", > - m->hdisplay, m->vdisplay, m->vrefresh); > + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); > return -ENOMEM; > } >...
2020 Feb 25
0
[PATCH 04/12] drm: Nuke mode->vrefresh
...8279d.c >>> index 74d58ee7d04c..7c27bd5e3486 100644 >>> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c >>> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c >>> @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, >>> mode = drm_mode_duplicate(connector->dev, m); >>> if (!mode) { >>> DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", >>> - m->hdisplay, m->vdisplay, m->vrefresh); >>> + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); >&...
2017 Jan 17
0
[PATCH 5/6] drm: Delete "mandatory" stereographic modes
...t; ARRAY_SIZE(stereo_mandatory_modes); i++) { - const struct stereo_mandatory_mode *mandatory; - struct drm_display_mode *new_mode; - - if (!stereo_match_mandatory(mode, - &stereo_mandatory_modes[i])) - continue; - - mandatory = &stereo_mandatory_modes[i]; - new_mode = drm_mode_duplicate(dev, mode); - if (!new_mode) - continue; - - new_mode->flags |= mandatory->flags; - list_add_tail(&new_mode->head, &stereo_modes); - modes++; - } - } - - list_splice_tail(&stereo_modes, &connector->probed_modes); - - return modes; -} - static int add_hdmi_mo...
2020 Feb 19
5
[PATCH 04/12] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 74d58ee7d04c..7c27bd5e3486 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, mode = drm_mode_duplicate(connector->dev, m); if (!mode) { DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); return -ENOMEM; } @@ -262,7 +262,6 @@ static const...
2020 Apr 04
0
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...vers/gpu/drm/panel/panel-boe-himax8279d.c > index 74d58ee7d04c..7c27bd5e3486 100644 > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c > @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel > *panel, > mode = drm_mode_duplicate(connector->dev, m); > if (!mode) { > DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", > - m->hdisplay, m->vdisplay, m->vrefresh); > + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); > return -ENOMEM; > } >...
2020 Apr 28
0
[PATCH v3 03/16] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 74d58ee7d04c..7c27bd5e3486 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, mode = drm_mode_duplicate(connector->dev, m); if (!mode) { DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); return -ENOMEM; } @@ -262,7 +262,6 @@ static const...
2020 Apr 03
3
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 74d58ee7d04c..7c27bd5e3486 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel, mode = drm_mode_duplicate(connector->dev, m); if (!mode) { DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); return -ENOMEM; } @@ -262,7 +262,6 @@ static const...
2017 Jan 18
2
[PATCH 5/6] drm: Delete "mandatory" stereographic modes
...if (!stereo_match_mandatory(mode, > - &stereo_mandatory_modes[i])) > - continue; > - > - mandatory = &stereo_mandatory_modes[i]; > - new_mode = drm_mode_duplicate(dev, mode); > - if (!new_mode) > - continue; > - > - new_mode->flags |= mandatory->flags; > - list_add_tail(&new_mode->head, &stereo_modes); > - m...
2009 Dec 13
3
[PATCH] drm/nouveau: use drm debug levels
...referred mode if there is one.. */ list_for_each_entry(mode, &connector->base.probed_modes, head) { if (mode->type & DRM_MODE_TYPE_PREFERRED) { - NV_DEBUG(dev, "native mode from preferred\n"); + NV_DEBUG_KMS(dev, "native mode from preferred\n"); return drm_mode_duplicate(dev, mode); } } @@ -445,7 +445,7 @@ nouveau_connector_native_mode(struct nouveau_connector *connector) largest = mode; } - NV_DEBUG(dev, "native mode from largest: %dx%d@%d\n", + NV_DEBUG_KMS(dev, "native mode from largest: %dx%d@%d\n", high_w, high_h, high_...
2017 Jan 17
32
[PATCH 0/6] drm/nouveau: Enable HDMI Stereoscopy
This is an initial implementation of HDMI 3D mode support for the nouveau kernel driver. It works on all of the hardware that I have available to test at the moment, but I am unsure as to the overall approach taken for setting HDMI InfoFrames, there's no support for g84 or gf119 disps, and the criteria for enabling stereo support for an output seems a bit iffy. The first four patches arrange
2009 Aug 13
9
[PATCHv2 01/10] drm/nouveau: Fix a lock up at NVSetOwner with nv11.
It seems it was only locking up in the context of nouveau_hw_save_vga_fonts, when it actually did something (because the console wasn't already in graphics mode). Signed-off-by: Francisco Jerez <currojerez at riseup.net> --- drivers/gpu/drm/nouveau/nouveau_hw.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hw.c