search for: drm_atomic_state

Displaying 20 results from an estimated 233 matches for "drm_atomic_state".

2020 Nov 14
0
[PATCH 3/8] drm/nouveau/kms/nv50-: Rename encoder->atomic_(enable|disable) callbacks
...eau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -455,7 +455,7 @@ nv50_outp_get_old_connector(struct nouveau_encoder *outp, * DAC *****************************************************************************/ static void -nv50_dac_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) +nv50_dac_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nv50_core *core = nv50_disp(encoder->dev)->core; @@ -467,7 +467,7 @@ nv50_dac_disable(struct drm_encoder *encoder, struct...
2020 Jul 27
1
[PATCH -next] crc:Fix build errors
...pe] struct nv50_head_atom *) {} ^~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ?nv50_crc_atomic_stop_reporting?: /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:118:32: error: parameter name omitted nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {} ^~~~~~~~~~~~~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ?nv50_crc_atomic_init_notifier_contexts?: /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:120:40: error: parameter name omitted nv50_crc_atomic_init_notifier_con...
2020 Jul 27
0
[PATCH -next] crc:Fix build errors
...om *) {} > ^~~~~~~~~~~~~~ > /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function > ?nv50_crc_atomic_stop_reporting?: > /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:118:32: error: > parameter name omitted > nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {} > ^~~~~~~~~~~~~~~~~~~~~~~~~ > /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function > ?nv50_crc_atomic_init_notifier_contexts?: > /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:120:40: error: > parameter name omitted > nv5...
2020 Jun 29
0
[PATCH] drm/nouveau/kms/nvd9-: Fix disabling CRCs alongside OR reprogramming
...etions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c index 0b18d9e3a2b96..f17fb6d56757a 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/crc.c +++ b/drivers/gpu/drm/nouveau/dispnv50/crc.c @@ -261,7 +261,29 @@ void nv50_crc_atomic_stop_reporting(struct drm_atomic_state *state) } } -void nv50_crc_atomic_prepare_notifier_contexts(struct drm_atomic_state *state) +void nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state; + struct drm_crtc *crtc; + int i; + + for_each_new_crtc_in_state(state, crtc, new...
2020 Nov 14
0
[PATCH 6/8] drm/nouveau/kms/nv50-: Lookup current encoder/crtc from atomic state
...21 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 2c0749fac9dc..63fff3988f19 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -449,6 +449,22 @@ nv50_outp_get_old_connector(struct drm_atomic_state *state, struct nouveau_encod return NULL; } +static struct nouveau_crtc * +nv50_outp_get_new_crtc(const struct drm_atomic_state *state, const struct nouveau_encoder *outp) +{ + struct drm_crtc *crtc; + struct drm_crtc_state *crtc_state; + const u32 mask = drm_encoder_mask(&outp->base.ba...
2020 Nov 14
0
[PATCH 5/8] drm/nouveau/kms/nv50-: Reverse args for nv50_outp_get_(old|new)_connector()
...ef517dc..2c0749fac9dc 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -418,8 +418,7 @@ nv50_outp_atomic_check(struct drm_encoder *encoder, } struct nouveau_connector * -nv50_outp_get_new_connector(struct nouveau_encoder *outp, - struct drm_atomic_state *state) +nv50_outp_get_new_connector(struct drm_atomic_state *state, struct nouveau_encoder *outp) { struct drm_connector *connector; struct drm_connector_state *connector_state; @@ -435,8 +434,7 @@ nv50_outp_get_new_connector(struct nouveau_encoder *outp, } struct nouveau_connector * -nv5...
2019 May 13
2
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...efficient ? It's atomic code, we're trying to optimize for clean code at the expense of a bit of runtime overhead due to more pointer chasing. And I agree with the general push, the pile of old/new_state pointers of various objects we're passing around is confusing. Passing the overall drm_atomic_state seems much more reasonable, and with that we can get everything else. Plus it's much more obvious whether you have the old/new state (since that's explicit when you look it up from the drm_atomic_state). If we ever see this show up in profile, and it starts mattering, first thing we need i...
2019 May 02
4
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -103,12 +103,14 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, } int intel_digital_connector_atomic_check(struct drm_connector *conn, - struct drm_connector_state *new_state) + struct drm_atomic_state *state) { + struct drm_connector_state *new_state = + drm_atomic_get_new_connector_state(state, conn); struct intel_digital_connector_state *new_conn_state = to_intel_digital_connector_state(new_state); struct drm_connector_state *old_state = - drm_atomic_get_old_connector_state(new_state...
2019 May 16
1
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...ode, we're trying to optimize for clean code at the expense > > of a bit of runtime overhead due to more pointer chasing. And I agree with > > the general push, the pile of old/new_state pointers of various objects > > we're passing around is confusing. Passing the overall drm_atomic_state > > seems much more reasonable, and with that we can get everything else. Plus > > it's much more obvious whether you have the old/new state (since that's > > explicit when you look it up from the drm_atomic_state). > > Yes, I agree it's cleaner. I just hope the...
2020 Nov 14
1
[PATCH 1/8] drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere
...au/dispnv50/disp.c @@ -455,7 +455,7 @@ nv50_outp_get_old_connector(struct nouveau_encoder *outp, * DAC *****************************************************************************/ static void -nv50_dac_disable(struct drm_encoder *encoder) +nv50_dac_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nv50_core *core = nv50_disp(encoder->dev)->core; @@ -467,7 +467,7 @@ nv50_dac_disable(struct drm_encoder *encoder) } static void -nv50_dac_enable(struct drm_encoder *encoder) +nv50_dac_enable(struct drm_e...
2019 May 13
2
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...much > > busy work for me. > > Given that drivers also access the connector state, isn't this slightly > more inefficient ? > Inefficient in terms of what? Agree that in isolation this patch might seem unnecessary, but it ties in with the encoder and bridge CLs which accept drm_atomic_state in their hooks. In general the idea is to convert all atomic functions to take overall atomic state instead of just their object state. Reality has proven to be more complicated and we need more access than what the current implementation provides. Sean > > Changes in v3: > > - Added...
2019 May 16
0
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...'s atomic code, we're trying to optimize for clean code at the expense > of a bit of runtime overhead due to more pointer chasing. And I agree with > the general push, the pile of old/new_state pointers of various objects > we're passing around is confusing. Passing the overall drm_atomic_state > seems much more reasonable, and with that we can get everything else. Plus > it's much more obvious whether you have the old/new state (since that's > explicit when you look it up from the drm_atomic_state). Yes, I agree it's cleaner. I just hope the atomic state tracking co...
2019 Jun 11
1
[PATCH v5 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -106,12 +106,14 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, } int intel_digital_connector_atomic_check(struct drm_connector *conn, - struct drm_connector_state *new_state) + struct drm_atomic_state *state) { + struct drm_connector_state *new_state = + drm_atomic_get_new_connector_state(state, conn); struct intel_digital_connector_state *new_conn_state = to_intel_digital_connector_state(new_state); struct drm_connector_state *old_state = - drm_atomic_get_old_connector_state(new_state...
2019 May 16
0
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...ler has it and can easily pass it. As Daniel commented, this may be the price to pay for a cleaner API, but I wonder how much overhead all the state tracking is costing. > Agree that in isolation this patch might seem unnecessary, but it ties > in with the encoder and bridge CLs which accept drm_atomic_state in CLs ? > their hooks. In general the idea is to convert all atomic functions to > take overall atomic state instead of just their object state. Reality > has proven to be more complicated and we need more access than what > the current implementation provides. > > Sean >...
2019 May 11
0
[PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...ers/gpu/drm/i915/intel_atomic.c > @@ -103,12 +103,14 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, > } > > int intel_digital_connector_atomic_check(struct drm_connector *conn, > - struct drm_connector_state *new_state) > + struct drm_atomic_state *state) > { > + struct drm_connector_state *new_state = > + drm_atomic_get_new_connector_state(state, conn); > struct intel_digital_connector_state *new_conn_state = > to_intel_digital_connector_state(new_state); > struct drm_connector_state *old_state = > - drm_atomi...
2019 May 08
0
[PATCH v4 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state
...i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -103,12 +103,14 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, } int intel_digital_connector_atomic_check(struct drm_connector *conn, - struct drm_connector_state *new_state) + struct drm_atomic_state *state) { + struct drm_connector_state *new_state = + drm_atomic_get_new_connector_state(state, conn); struct intel_digital_connector_state *new_conn_state = to_intel_digital_connector_state(new_state); struct drm_connector_state *old_state = - drm_atomic_get_old_connector_state(new_state...
2020 Jul 20
0
[PATCH] drm/nouveau/kms/nv50-: Fix CRC-related compile errors with debugfs disabled
...ype] 112 | struct nv50_head_atom *) {} | ^~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ?nv50_crc_atomic_stop_reporting?: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:114:32: error: parameter name omitted 114 | nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ?nv50_crc_atomic_prepare_notifier_contexts?: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:116:43: error: parameter name omitted 116 | nv50_crc_atomic_prepare_notifier_contexts(...
2017 Jul 12
2
[PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...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 == crtc) { asyc = nouveau_conn_atom(conns); break; @@ -3904,9 +3904,9 @@ static void nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) { struct drm_device *dev = state->dev; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *new_crtc_state; struct drm_crtc *crtc; - struct drm_plane_state *plane_state; + struct drm_plane_state *new_plane_state; struct drm_plane *plane; struct nouveau_drm *drm = nouvea...
2017 Jul 19
1
[PATCH v2 6/7] drm/nouveau: Convert nouveau to use new iterator macros, v2.
...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 == crtc) { asyc = nouveau_conn_atom(conns); break; @@ -3905,9 +3905,9 @@ static void nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) { struct drm_device *dev = state->dev; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *new_crtc_state; struct drm_crtc *crtc; - struct drm_plane_state *plane_state; + struct drm_plane_state *new_plane_state; struct drm_plane *plane; struct nouveau_drm *drm = nouvea...
2019 Feb 01
0
[PATCH v2 3/4] drm/atomic: Add drm_atomic_state->duplicated
...d, 46 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 6fe2303fccd9..f578bf1fe164 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -332,8 +332,15 @@ update_connector_routing(struct drm_atomic_state *state, * about is ensuring that userspace can't do anything but shut off the * display on a connector that was destroyed after its been notified, * not before. + * + * Additionally, we also want to ignore connector registration when + * we're trying to restore an atomic state d...