search for: nouveau_connector_ddc_detect

Displaying 20 results from an estimated 39 matches for "nouveau_connector_ddc_detect".

2018 Aug 23
0
[PATCH] drm/nouveau: Fix nouveau_connector_ddc_detect()
...if (id == 0) break; Since it's rather difficult to notice: the conditional in this loop is actually: nv_encoder = NULL, i < DRM_CONNECTOR_MAX_ENCODER Meaning that all early breaks result in nv_encoder keeping it's value, otherwise nv_encoder = NULL. Ugh. Since this got dropped, nouveau_connector_ddc_detect() now returns an encoder for every single connector, regardless of whether or not it's detected: [ 1780.056185] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-2 So: fix this to ensure we only return an encoder if we actually found one, and clean up the rest of the function w...
2018 Aug 30
2
[PATCH v2] drm/nouveau: Fix nouveau_connector_ddc_detect()
...if (id == 0) break; Since it's rather difficult to notice: the conditional in this loop is actually: nv_encoder = NULL, i < DRM_CONNECTOR_MAX_ENCODER Meaning that all early breaks result in nv_encoder keeping it's value, otherwise nv_encoder = NULL. Ugh. Since this got dropped, nouveau_connector_ddc_detect() now returns an encoder for every single connector, regardless of whether or not it's detected: [ 1780.056185] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-2 So: fix this to ensure we only return an encoder if we actually found one, and clean up the rest of the function w...
2018 Aug 30
0
[PATCH v2] drm/nouveau: Fix nouveau_connector_ddc_detect()
...rather difficult to notice: the conditional in this loop is > actually: > > nv_encoder = NULL, i < DRM_CONNECTOR_MAX_ENCODER > > Meaning that all early breaks result in nv_encoder keeping it's value, > otherwise nv_encoder = NULL. Ugh. > > Since this got dropped, nouveau_connector_ddc_detect() now returns an > encoder for every single connector, regardless of whether or not it's > detected: > > [ 1780.056185] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-2 > > So: fix this to ensure we only return an encoder if we actually found > one, and...
2018 Jun 30
2
[PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()
...erhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-Third-attempt-at-fixing-the-fb-helper-best_encoder-mess/20180629-014202 base: git://people.freedesktop.org/~airlied/linux.git drm-next smatch warnings: drivers/gpu/drm/nouveau/nouveau_connector.c:461 nouveau_connector_ddc_detect() error: uninitialized symbol 'nv_encoder'. # https://github.com/0day-ci/linux/commit/7ec8bb65386edfb0b2bdc8e8391eb5e6eac44c06 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 7ec8bb65386edfb0b2bdc8e8391eb5e6eac44c06 vim +/nv_encoder...
2018 Jun 28
4
[PATCH v2 0/9] drm: Third attempt at fixing the fb-helper .best_encoder() mess
From: Ville Syrjälä <ville.syrjala at linux.intel.com> Changes from the previous version mainly involve Danoie's suggestion of hiding the drm_encoder_find() in the iterator macro. I also polished the msm and tilcdc cases a bit more with another small helper. Cc: Alex Deucher <alexander.deucher at amd.com> Cc: amd-gfx at lists.freedesktop.org Cc: Ben Skeggs <bskeggs at
2016 Jan 11
0
[PATCH v5 07/12] drm/nouveau: Switch DDC when reading the EDID
...pu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -27,6 +27,7 @@ #include <acpi/button.h> #include <linux/pm_runtime.h> +#include <linux/vga_switcheroo.h> #include <drm/drmP.h> #include <drm/drm_edid.h> @@ -153,6 +154,17 @@ nouveau_connector_ddc_detect(struct drm_connector *connector) if (ret == 0) break; } else + if ((vga_switcheroo_handler_flags() & + VGA_SWITCHEROO_CAN_SWITCH_DDC) && + nv_encoder->dcb->type == DCB_OUTPUT_LVDS && + nv_encoder->i2c) { + int ret; + vga_switcheroo_lock_...
2018 Jun 26
1
[PATCH 6/8] drm/nouveau: Use drm_for_each_connector_encoder_ids()
...= connector->encoder_ids[i]; - if (!id) - break; - - enc = drm_encoder_find(dev, NULL, id); + drm_for_each_connector_encoder_ids(connector, encoder_id, i) { + enc = drm_encoder_find(dev, NULL, encoder_id); if (!enc) continue; nv_encoder = nouveau_encoder(enc); @@ -423,6 +420,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector) struct nouveau_encoder *nv_encoder; struct drm_encoder *encoder; int i, panel = -ENODEV; + u32 encoder_id; /* eDP panels need powering on by us (if the VBIOS doesn't default it * to on) before doing any AUX channel transactions. LVDS panel power @@...
2018 Jul 02
0
[PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()
...gt; > url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-Third-attempt-at-fixing-the-fb-helper-best_encoder-mess/20180629-014202 > base: git://people.freedesktop.org/~airlied/linux.git drm-next > > smatch warnings: > drivers/gpu/drm/nouveau/nouveau_connector.c:461 nouveau_connector_ddc_detect() error: uninitialized symbol 'nv_encoder'. > > # https://github.com/0day-ci/linux/commit/7ec8bb65386edfb0b2bdc8e8391eb5e6eac44c06 > git remote add linux-review https://github.com/0day-ci/linux > git remote update linux-review > git checkout 7ec8bb65386edfb0b2bdc8e8391eb5e6e...
2014 Feb 11
2
[PATCH] drm/nouveau: handle -EACCES runtime PM return code
On Mon, Feb 10, 2014 at 9:34 PM, Thierry Reding <thierry.reding at gmail.com> wrote: > On Mon, Feb 10, 2014 at 02:58:12PM +0900, Alexandre Courbot wrote: >> pm_runtime_get*() may return -EACCESS to indicate a device does not have > > s/-EACCESS/-EACCES/ Oops. >> runtime PM enabled. This is the case when the nouveau.runpm parameter is >> set to 0, and is not an
2018 Jun 28
0
[PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()
...{ - id = connector->encoder_ids[i]; - if (!id) - break; + int i; - enc = drm_encoder_find(dev, NULL, id); - if (!enc) - continue; + drm_connector_for_each_possible_encoder(connector, enc, i) { nv_encoder = nouveau_encoder(enc); if (type == DCB_OUTPUT_ANY || @@ -436,14 +428,7 @@ nouveau_connector_ddc_detect(struct drm_connector *connector) } } - for (i = 0; nv_encoder = NULL, i < DRM_CONNECTOR_MAX_ENCODER; i++) { - int id = connector->encoder_ids[i]; - if (id == 0) - break; - - encoder = drm_encoder_find(dev, NULL, id); - if (!encoder) - continue; + drm_connector_for_each_possible...
2020 Jun 14
0
[PATCH] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 5.8 50/62] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 5.7 49/61] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 5.4 38/48] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 4.19 32/38] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 4.14 25/30] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 4.9 21/26] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2020 Aug 21
0
[PATCH AUTOSEL 4.4 17/22] drm/nouveau: Fix reference count leak in nouveau_connector_detect
...ctor, bool force) pm_runtime_get_noresume(dev->dev); } else { ret = pm_runtime_get_sync(dev->dev); - if (ret < 0 && ret != -EACCES) + if (ret < 0 && ret != -EACCES) { + pm_runtime_put_autosuspend(dev->dev); return conn_status; + } } nv_encoder = nouveau_connector_ddc_detect(connector); -- 2.25.1
2014 Feb 01
0
[RFC 01/16] drm/nouveau: handle -EACCES runtime PM return code
....c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -255,7 +255,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) } ret = pm_runtime_get_sync(connector->dev->dev); - if (ret < 0) + if (ret < 0 && ret != -EACCES) return conn_status; i2c = nouveau_connector_ddc_detect(connector, &nv_encoder); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 98a22e6..23299ca 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -670,7 +670,7 @@ nouveau_drm_open(struct drm_device *dev,...
2014 Feb 12
0
[PATCH v2] drm/nouveau: handle -EACCES runtime PM return code
....c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -255,7 +255,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) } ret = pm_runtime_get_sync(connector->dev->dev); - if (ret < 0) + if (ret < 0 && ret != -EACCES) return conn_status; i2c = nouveau_connector_ddc_detect(connector, &nv_encoder); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index b45fd1a0ab28..c677a09aac3f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -696,7 +696,7 @@ nouveau_drm_open(struct drm_dev...