search for: drm_for_each_encoder

Displaying 20 results from an estimated 28 matches for "drm_for_each_encoder".

2020 Sep 22
1
[PATCH] drm/nouveau/kms: Remove set but not used 'ret'
...9,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); ret = drm_dp_update_payload_part1(&mstm->mgr); + if (ret) { + NV_ATOMIC(drm, "failed to update payload %d\n", ret); + } drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- 2.7.4
2020 Sep 19
0
[PATCH -next] gpu: nouveau: Remove set but not used variable
...et; NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); - ret = drm_dp_check_act_status(&mstm->mgr); - - ret = drm_dp_update_payload_part2(&mstm->mgr); + drm_dp_check_act_status(&mstm->mgr); + drm_dp_update_payload_part2(&mstm->mgr); drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { @@ -1330,10 +1328,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) { struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); struct drm_encoder *encoder; - int ret; NV_ATO...
2020 Nov 06
4
[PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
Hi folks, Currently, when the device is removed (or the driver is unbound) the nouveau_drm structure de-allocated. However, it's still accessible from and used by some DRM layer callbacks. For example, file handles can be closed after the device has been removed (physically or otherwise). This series converts the Nouveau device structure to be allocated and de-allocated with the
2019 Aug 21
2
[PATCH v2] drm: Bump encoder limit from 32 to 64
...t;atomic_print_state) diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c index 7fb47b7b8b44..9d443b45ebba 100644 --- a/drivers/gpu/drm/drm_encoder.c +++ b/drivers/gpu/drm/drm_encoder.c @@ -71,6 +71,14 @@ int drm_encoder_register_all(struct drm_device *dev) int ret = 0; drm_for_each_encoder(encoder, dev) { + /* + * Since possible_clones has been exposed to userspace as a + * 32bit bitmask, we don't allow creating encoders with an + * index >=32 which are capable of cloning + */ + if (WARN_ON(encoder->index >= 32 && encoder->possible_clones)) + retur...
2020 Sep 22
0
[PATCH] drm/nouveau/kms: Remove set but not used 'ret'
....name); > ret = drm_dp_update_payload_part1(&mstm->mgr); > + if (ret) { > + NV_ATOMIC(drm, "failed to update payload %d\n", ret); > + } Remove the braces around ret and this is: Reviewed-by: Lyude Paul <lyude at redhat.com> > > drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { > if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
2020 Sep 23
0
[PATCH v2] drm/nouveau/kms: Remove set but not used 'ret'
...nv50/disp.c @@ -1379,6 +1379,8 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); ret = drm_dp_update_payload_part1(&mstm->mgr); + if (ret) + NV_ATOMIC(drm, "failed to update payload %d\n", ret); drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- 2.7.4
2023 Apr 07
3
[PATCH 2/2] drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state
...med display state */ +void +nv50_display_read_hw_state(struct nouveau_drm *drm) +{ + struct drm_device *dev = drm->dev; + struct drm_encoder *encoder; + struct drm_modeset_acquire_ctx ctx; + struct nv50_disp *disp = nv50_disp(dev); + int ret; + + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); + + drm_for_each_encoder(encoder, dev) { + if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) + continue; + + nv50_display_read_hw_or_state(dev, disp, nouveau_encoder(encoder)); + } + + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); +} + static int nv50_display_init(struct drm_device *dev, bool resume, bool runtime)...
2020 Nov 14
0
[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks
...veau_drm *drm = nouveau_drm(drm_dev); struct drm_encoder *encoder; struct nouveau_encoder *nv_encoder; - struct drm_connector *connector; struct nouveau_crtc *nv_crtc; - struct drm_connector_list_iter conn_iter; int ret = 0; *enabled = false; + mutex_lock(&drm->audio.lock); + drm_for_each_encoder(encoder, drm->dev) { struct nouveau_connector *nv_connector = NULL; + if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) + continue; /* TODO */ + nv_encoder = nouveau_encoder(encoder); + nv_connector = nouveau_connector(nv_encoder->audio.connector); + nv_crtc = nouveau_crtc(...
2020 Jan 10
0
[PATCH 15/23] drm/msm: Convert to CRTC VBLANK callbacks
.../drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -583,38 +583,6 @@ static int get_clk(struct platform_device *pdev, struct clk **clkp, return 0; } -static struct drm_encoder *get_encoder_from_crtc(struct drm_crtc *crtc) -{ - struct drm_device *dev = crtc->dev; - struct drm_encoder *encoder; - - drm_for_each_encoder(encoder, dev) - if (encoder->crtc == crtc) - return encoder; - - return NULL; -} - -static u32 mdp5_get_vblank_counter(struct drm_device *dev, unsigned int pipe) -{ - struct msm_drm_private *priv = dev->dev_private; - struct drm_crtc *crtc; - struct drm_encoder *encoder; - - if (pipe >=...
2019 Aug 21
0
[PATCH v2] drm: Bump encoder limit from 32 to 64
...drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c > index 7fb47b7b8b44..9d443b45ebba 100644 > --- a/drivers/gpu/drm/drm_encoder.c > +++ b/drivers/gpu/drm/drm_encoder.c > @@ -71,6 +71,14 @@ int drm_encoder_register_all(struct drm_device *dev) > int ret = 0; > > drm_for_each_encoder(encoder, dev) { > + /* > + * Since possible_clones has been exposed to userspace as a > + * 32bit bitmask, we don't allow creating encoders with an > + * index >=32 which are capable of cloning > + */ > + if (WARN_ON(encoder->index >= 32 && encoder-&...
2020 Jan 13
0
[PATCH RESEND] drm/nouveau: Add HD-audio component notifier support
...max_bytes) +{ + struct drm_device *drm_dev = dev_get_drvdata(kdev); + struct nouveau_drm *drm = nouveau_drm(drm_dev); + struct drm_encoder *encoder; + struct nouveau_encoder *nv_encoder; + struct nouveau_connector *nv_connector; + struct nouveau_crtc *nv_crtc; + int ret = 0; + + *enabled = false; + drm_for_each_encoder(encoder, drm->dev) { + nv_encoder = nouveau_encoder(encoder); + nv_connector = nouveau_encoder_connector_get(nv_encoder); + nv_crtc = nouveau_crtc(encoder->crtc); + if (!nv_connector || !nv_crtc || nv_crtc->index != port) + continue; + *enabled = drm_detect_monitor_audio(nv_connecto...
2018 Jul 12
3
[PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs
This hooks up the DRM helpers for dumping information on the current status of each MST topology from nouveau's perspective to debugfs files, similar to what i915 does (albeit, i915 labels their debugfs node for this as i915_dp_mst_info). Lyude Paul (2): drm/nouveau: Expose nv50 MST structures in disp.h drm/nouveau: Hook up dp_mst_info in debugfs drivers/gpu/drm/nouveau/dispnv50/disp.c
2018 Jul 20
7
[PATCH 0/6] improve feature detection
This is mainly for dropping interlaced modes on DP connectors if the GPU would otherwise display garbage or EVO timesout. It also adds experimental detection of the HDMI clock limit we currently hard limit depending on the GPU generation. Starting with GF110 GPUs, we can retrieve the limit directly from the GPU and may make the hdmimhz parameter obsolete. Testing this series with 2560x1440 or
2018 Aug 03
7
[PATCH v3 0/6] improve feature detection
small update to my last version I sent out. Patches 3-6 are optional and should only improve detecting the max clocks for HDMI and DP, but they didn't underwent big testing and I am a bit concerned, that it might break detecting the DP limits on some boards. Karol Herbst (6): kms/nv50: move nv50_mstm out of the dp union in nouveau_encoder kms/nv50: reject interlaced modes if the hardware
2020 Aug 20
0
[RFC v2 06/20] drm/nouveau/kms: Search for encoders' connectors properly
...eau_drm *drm = nouveau_drm(drm_dev); struct drm_encoder *encoder; struct nouveau_encoder *nv_encoder; + struct drm_connector *connector; struct nouveau_connector *nv_connector; struct nouveau_crtc *nv_crtc; + struct drm_connector_list_iter conn_iter; int ret = 0; *enabled = false; + drm_for_each_encoder(encoder, drm->dev) { nv_encoder = nouveau_encoder(encoder); - nv_connector = nouveau_encoder_connector_get(nv_encoder); + + drm_connector_list_iter_begin(drm_dev, &conn_iter); + drm_for_each_connector_iter(connector, &conn_iter) { + if (connector->state->best_encoder == enc...
2023 Apr 07
1
[PATCH 1/2] drm/nouveau/nvkm/outp: Use WARN_ON() in conditionals in nvkm_outp_init_route()
Signed-off-by: Lyude Paul <lyude at redhat.com> --- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c index 6094805fbd63..06b19883a06b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c +++
2020 Aug 25
22
[RFC v4 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM related and MST related fixes, we're missing a lot of nice things that have been added to DRM since this was originally written. Additionally, the code
2020 Aug 20
22
[RFC v2 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
To start off: this patch series is less work to review then it looks - most (but not all) of the nouveau related work has already been reviewed elsewhere. Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM
2020 Aug 26
23
[PATCH v5 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM related and MST related fixes, we're missing a lot of nice things that have been added to DRM since this was originally written. Additionally, the code
2020 Jan 20
26
[PATCH v3 00/22] drm: Clean up VBLANK callbacks in struct drm_driver
VBLANK handlers in struct drm_driver are deprecated. Only legacy, non-KMS drivers are supposed to used them. DRM drivers with kernel modesetting are supposed to use VBLANK callbacks of the CRTC infrastructure. This patchset converts all DRM drivers to CRTC VBLANK callbacks and cleans up struct drm_driver. The remaining VBLANK callbacks in struct drm_driver are only used by legacy drivers. Patch