Displaying 20 results from an estimated 187 matches for "crtc_state".
2018 Jan 24
0
[PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
...vers/gpu/drm/arm/hdlcd_crtc.c
> @@ -229,7 +229,6 @@ static const struct drm_crtc_helper_funcs hdlcd_crtc_helper_funcs = {
> static int hdlcd_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> - struct drm_rect clip = { 0 };
> struct drm_crtc_state *crtc_state;
> u32 src_h = state->src_h >> 16;
>
> @@ -249,11 +248,7 @@ static int hdlcd_plane_atomic_check(struct drm_plane *plane,
> return -EINVAL;
> }
>
> - if (crtc_state->enable)
> - drm_mode_get_hv_timing(&crtc_state->mode,
> -...
2018 Jan 23
6
[PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
...drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -229,7 +229,6 @@ static const struct drm_crtc_helper_funcs hdlcd_crtc_helper_funcs = {
static int hdlcd_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *state)
{
- struct drm_rect clip = { 0 };
struct drm_crtc_state *crtc_state;
u32 src_h = state->src_h >> 16;
@@ -249,11 +248,7 @@ static int hdlcd_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
}
- if (crtc_state->enable)
- drm_mode_get_hv_timing(&crtc_state->mode,
- &clip.x2, &clip.y2);
-
- return d...
2017 Feb 21
2
[PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...device *dev,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_atomic_state *state;
+ struct drm_connector_state *conn_state;
struct drm_connector *conn;
- struct drm_connector_list_iter conn_iter;
- int err;
+ struct drm_plane_state *plane_state;
+ struct drm_plane *plane;
+ struct drm_crtc_state *crtc_state;
+ struct drm_crtc *crtc;
+ int ret, i;
state = drm_atomic_state_alloc(dev);
if (!state)
@@ -2437,29 +2441,48 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
state->acquire_ctx = ctx;
- drm_connector_list_iter_get(dev, &conn_iter);
- drm_for_each_connecto...
2019 May 02
4
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...tor_state(new_state);
struct drm_connector_state *old_state =
- drm_atomic_get_old_connector_state(new_state->state, conn);
+ drm_atomic_get_old_connector_state(state, conn);
struct intel_digital_connector_state *old_conn_state =
to_intel_digital_connector_state(old_state);
struct drm_crtc_state *crtc_state;
@@ -118,7 +120,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
if (!new_state->crtc)
return 0;
- crtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc);
+ crtc_state = drm_atomic_get_new_crtc_state(state, new_state->cr...
2019 May 13
2
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
..._atomic_get_old_connector_state(new_state->state, conn);
> > + drm_atomic_get_old_connector_state(state, conn);
> > struct intel_digital_connector_state *old_conn_state =
> > to_intel_digital_connector_state(old_state);
> > struct drm_crtc_state *crtc_state;
> > @@ -118,7 +120,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
> > if (!new_state->crtc)
> > return 0;
> >
> > - crtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc);
&...
2017 Feb 23
0
[Intel-gfx] [PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
On Tue, Feb 21, 2017 at 02:51:40PM +0100, Maarten Lankhorst wrote:
> It seems that nouveau requires this, so best to do this in the helper.
> This allows nouveau to use the atomic suspend helper.
Pardon the stupid question, but why can't nouveau just do the right thing when
crtc_state->active becomes false?
Sean
>
> Cc: nouveau at lists.freedesktop.org
> Acked-by: Ben Skeggs <bskeggs at redhat.com> #irc
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 51 ++++++++++-...
2019 Jun 11
1
[PATCH v5 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...tor_state(new_state);
struct drm_connector_state *old_state =
- drm_atomic_get_old_connector_state(new_state->state, conn);
+ drm_atomic_get_old_connector_state(state, conn);
struct intel_digital_connector_state *old_conn_state =
to_intel_digital_connector_state(old_state);
struct drm_crtc_state *crtc_state;
@@ -121,7 +123,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
if (!new_state->crtc)
return 0;
- crtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc);
+ crtc_state = drm_atomic_get_new_crtc_state(state, new_state->cr...
2019 May 13
2
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...*old_state =
> > - drm_atomic_get_old_connector_state(new_state->state, conn);
> > + drm_atomic_get_old_connector_state(state, conn);
> > struct intel_digital_connector_state *old_conn_state =
> > to_intel_digital_connector_state(old_state);
> > struct drm_crtc_state *crtc_state;
> > @@ -118,7 +120,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
> > if (!new_state->crtc)
> > return 0;
> >
> > - crtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc);
> > + crtc_s...
2017 Jan 09
0
[PATCH 3/3] drm/atomic: Make disable_all helper fully disable the crtc.
...device *dev,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_atomic_state *state;
+ struct drm_connector_state *conn_state;
struct drm_connector *conn;
- struct drm_connector_list_iter conn_iter;
- int err;
+ struct drm_plane_state *plane_state;
+ struct drm_plane *plane;
+ struct drm_crtc_state *crtc_state;
+ struct drm_crtc *crtc;
+ int ret, i;
state = drm_atomic_state_alloc(dev);
if (!state)
@@ -2446,29 +2450,48 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
state->acquire_ctx = ctx;
- drm_connector_list_iter_get(dev, &conn_iter);
- drm_for_each_connecto...
2017 Jul 12
2
[PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...ff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 42a85c14aea0..b1ce8f1f58dc 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -2103,7 +2103,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
NV_ATOMIC(drm, "%s atomic_check %d\n", crtc->name, asyh->state.active);
if (asyh->state.active) {
- for_each_connector_in_state(asyh->state.state, conn, conns, i) {
+ for_each_new_connector_in_state(asyh->state.state, conn, conns, i) {
if (conns->crtc...
2018 May 11
2
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...ate, int plane)
> }
> }
>
> +static int vc4_plane_underscan_adj(struct drm_plane_state *pstate)
> +{
> + struct vc4_plane_state *vc4_pstate = to_vc4_plane_state(pstate);
> + struct drm_connector_state *conn_state = NULL;
> + struct drm_connector *conn;
> + struct drm_crtc_state *crtc_state;
> + int i;
> +
> + for_each_new_connector_in_state(pstate->state, conn, conn_state, i) {
> + if (conn_state->crtc == pstate->crtc)
> + break;
> + }
> +
> + if (i == pstate->state->num_connector)
> + return 0;
> +
> + if (conn_state-&g...
2018 Nov 12
14
[PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
...lay/amdgpu_dm/amdgpu_dm.c
@@ -2802,9 +2802,7 @@ static void dm_crtc_reset_state(struct drm_crtc *crtc)
if (WARN_ON(!state))
return;
- crtc->state = &state->base;
- crtc->state->crtc = crtc;
-
+ __drm_atomic_helper_crtc_reset(crtc, &state->base);
}
static struct drm_crtc_state *
diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index e1b72782848c..9a924ff27148 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -474,10 +474,7 @@ static void malidp_crtc_reset(struct drm_crtc *crtc)
kfree(state);...
2018 Jan 23
0
[PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
...gt; --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -699,7 +699,6 @@ EXPORT_SYMBOL(drm_atomic_helper_check_modeset);
> * drm_atomic_helper_check_plane_state() - Check plane state for validity
> * @plane_state: plane state to check
> * @crtc_state: crtc state to check
> - * @clip: integer clipping coordinates
> * @min_scale: minimum @src:@dest scaling factor in 16.16 fixed point
> * @max_scale: maximum @src:@dest scaling factor in 16.16 fixed point
> * @can_position: is it legal to position the plane such that it
> @@ -7...
2018 Nov 22
0
[PATCH v3 2/3] drm/vc4: Take underscan setup into account when updating planes
....c | 50 +++++++++++++++++++++++++++++++++
3 files changed, 100 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index 3ce136ba8791..3ace68186f07 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -49,6 +49,11 @@ struct vc4_crtc_state {
struct drm_mm_node mm;
bool feed_txp;
bool txp_armed;
+
+ struct {
+ unsigned int vborder;
+ unsigned int hborder;
+ } underscan;
};
static inline struct vc4_crtc_state *
@@ -624,6 +629,39 @@ static enum drm_mode_status vc4_crtc_mode_valid(struct drm_crtc *crtc,
return MODE_OK;
}...
2017 Jan 29
7
[v3 PATCH 0/3] Allow ASYNC flip with atomic helpers.
...eau/kms who seems to have to duplicate
the helper as we did to support ASYNC flips.
v2:
Resend drm/atomic: Save flip flags in drm_plane_state since
the original patch was incomplete.
Squash 2 AMD changes into one to not break compilation.
v3:
Following Daniel's comments, save flip flags in crtc_state
instead of plane_state.
Andrey Grodzovsky (3):
drm/atomic: Save flip flags in drm_crtct_state
drm/nouveau/kms/nv50: Switch to using atomic helper for flip.
drm/amd/display: Switch to using atomic_helper for flip.
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 -
.../drm/amd/displ...
2018 May 11
2
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...ic int vc4_plane_underscan_adj(struct drm_plane_state *pstate)
> > > +{
> > > + struct vc4_plane_state *vc4_pstate = to_vc4_plane_state(pstate);
> > > + struct drm_connector_state *conn_state = NULL;
> > > + struct drm_connector *conn;
> > > + struct drm_crtc_state *crtc_state;
> > > + int i;
> > > +
> > > + for_each_new_connector_in_state(pstate->state, conn, conn_state, i) {
> > > + if (conn_state->crtc == pstate->crtc)
> > > + break;
> > > + }
> > > +
> > > + if (i == pstat...
2017 Jul 19
1
[PATCH v2 6/7] drm/nouveau: Convert nouveau to use new iterator macros, v2.
...ff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 747c99c1e474..7abfb561b00c 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -2103,7 +2103,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
NV_ATOMIC(drm, "%s atomic_check %d\n", crtc->name, asyh->state.active);
if (asyh->state.active) {
- for_each_connector_in_state(asyh->state.state, conn, conns, i) {
+ for_each_new_connector_in_state(asyh->state.state, conn, conns, i) {
if (conns->crtc...
2018 May 11
3
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...ate *pstate)
> > > > > +{
> > > > > + struct vc4_plane_state *vc4_pstate = to_vc4_plane_state(pstate);
> > > > > + struct drm_connector_state *conn_state = NULL;
> > > > > + struct drm_connector *conn;
> > > > > + struct drm_crtc_state *crtc_state;
> > > > > + int i;
> > > > > +
> > > > > + for_each_new_connector_in_state(pstate->state, conn, conn_state, i) {
> > > > > + if (conn_state->crtc == pstate->crtc)
> > > > > + break;
> > > &g...
2017 Feb 01
6
[PATCH v4 0/3] Allow ASYNC flip with atomic helpers.
...veau/kms who seems to have to duplicate the helper as we did to support ASYNC flips.
v2:
Resend drm/atomic: Save flip flags in drm_plane_state since the original patch was incomplete.
Squash 2 AMD changes into one to not break compilation.
v3:
Following Daniel's comments, save flip flags in crtc_state instead of plane_state.
v4:
Lauren's comment, reset flp flags before using again.
Harry's comment, fix identation in amd/display.
Andrey Grodzovsky (3):
drm/atomic: Save flip flags in drm_crtct_state
drm/nouveau/kms/nv50: Switch to using atomic helper for flip.
drm/amd/display: Swit...
2023 Mar 30
2
[PATCH] drm/nouveau/disp: Support more modes by checking with lower bpc
...374147b8d..f28e47c161dd9 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -363,6 +363,35 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder,
return 0;
}
+static void
+nv50_outp_atomic_fix_depth(struct drm_encoder *encoder, struct drm_crtc_state *crtc_state)
+{
+ struct nv50_head_atom *asyh = nv50_head_atom(crtc_state);
+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
+ struct drm_display_mode *mode = &asyh->state.adjusted_mode;
+ unsigned int max_rate, mode_rate;
+
+ switch (nv_encoder->dcb->type) {
+ case DCB...