From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 05/23] drm/i915: Allocate a drm_atomic_state for the legacy modeset code
Date: Thu, 12 Mar 2015 14:28:41 +0200 [thread overview]
Message-ID: <1426163321.24210.1.camel@gmail.com> (raw)
In-Reply-To: <20150309231926.GF27526@intel.com>
On Mon, 2015-03-09 at 16:19 -0700, Matt Roper wrote:
> On Wed, Mar 04, 2015 at 04:33:17PM +0100, Daniel Vetter wrote:
> > On Tue, Mar 03, 2015 at 03:21:59PM +0200, Ander Conselvan de Oliveira wrote:
> > > For the atomic conversion, the mode set paths need to be changed to rely
> > > on an atomic state instead of using the staged config. By using an
> > > atomic state for the legacy code, we will be able to convert the code
> > > base in small chunks.
> > >
> > > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> >
> > Two small comments below.
> > -Daniel
> >
> > > ---
> > > drivers/gpu/drm/i915/intel_display.c | 118 +++++++++++++++++++++++++++--------
> > > 1 file changed, 91 insertions(+), 27 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index 798de7b..97d4df5 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -37,6 +37,7 @@
> > > #include <drm/i915_drm.h>
> > > #include "i915_drv.h"
> > > #include "i915_trace.h"
> > > +#include <drm/drm_atomic.h>
> > > #include <drm/drm_atomic_helper.h>
> > > #include <drm/drm_dp_helper.h>
> > > #include <drm/drm_crtc_helper.h>
> > > @@ -10290,10 +10291,22 @@ static bool check_digital_port_conflicts(struct drm_device *dev)
> > > return true;
> > > }
> > >
> > > -static struct intel_crtc_state *
> > > +static void
> > > +clear_intel_crtc_state(struct intel_crtc_state *crtc_state)
> > > +{
> > > + struct drm_crtc_state tmp_state;
> > > +
> > > + /* Clear only the intel specific part of the crtc state */
> > > + tmp_state = crtc_state->base;
> > > + memset(crtc_state, 0, sizeof *crtc_state);
> > > + crtc_state->base = tmp_state;
> > > +}
> >
> > I guess this is to clear out state which we want to recompute, and our
> > compute_config code assumes that it's always kzalloc'ed a new config?
> >
> > I think this should be part of the crtc duplicate_state callback to make
> > sure we're doing this consistently.
>
> If we zero out the config in duplicate_state(), then we're not really
> "duplicating" anymore are we? Ultimately we want to be able to
> duplicate the existing state, tweak a couple things, and then pass that
> state through the atomic pipeline, so it feels like doing a clear in the
> duplicate function is the wrong move, even if it would work for the
> frankenstein-style codebase we have at the moment.
Yeah, I guess I can't run away from inspecting the code and fixing
whatever expects the crtc_state to be zeroed.
Ander
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-12 12:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 13:21 [PATCH 00/23] Remove depencies on staged config for atomic transition Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 01/23] drm/i915: Set crtc backpointer when duplicating crtc state Ander Conselvan de Oliveira
2015-03-04 15:24 ` Daniel Vetter
2015-03-03 13:21 ` [PATCH 02/23] drm/i915: Add a for_each_intel_connector macro Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 03/23] drm/i915: Improve staged config logging Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 04/23] drm/i915: Add intel_atomic_get_crtc_state() helper function Ander Conselvan de Oliveira
2015-03-04 15:27 ` Daniel Vetter
2015-03-03 13:21 ` [PATCH 05/23] drm/i915: Allocate a drm_atomic_state for the legacy modeset code Ander Conselvan de Oliveira
2015-03-04 15:33 ` Daniel Vetter
2015-03-09 23:19 ` Matt Roper
2015-03-12 12:28 ` Ander Conselvan De Oliveira [this message]
2015-03-03 13:22 ` [PATCH 06/23] drm/i915: Add an optional atomic state argument to intel_set_mode() Ander Conselvan de Oliveira
2015-03-04 15:41 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 07/23] drm/i915: Use an atomic state for the load detect modeset Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 08/23] drm/i915: Allocate a crtc_state also when the crtc is being disabled Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 09/23] drm/i915: Update dummy connector atomic state with current config Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 10/23] drm/i915: Implement connector state duplication Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 11/23] drm/i915: Copy the staged connector config to the legacy atomic state Ander Conselvan de Oliveira
2015-03-04 15:46 ` Daniel Vetter
2015-03-04 16:58 ` Conselvan De Oliveira, Ander
2015-03-04 17:51 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 12/23] drm/i915: Don't use encoder->new_crtc in intel_modeset_pipe_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 13/23] drm/i915: Don't use encoder->new_crtc in compute_baseline_pipe_bpp() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 14/23] drm/i915: Don't depend on encoder->new_crtc in intel_dp_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 15/23] drm/i915: Don't depend on encoder->new_crtc in intel_hdmi_compute_config Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 16/23] drm/i915: Use atomic state in intel_ddi_crtc_get_new_encoder() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 17/23] drm/i915: Don't use staged config in intel_dp_mst_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 18/23] drm/i915: Don't use encoder->new_crtc in intel_lvds_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 19/23] drm/i915: Pass an atomic state to modeset_global_resources() functions Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 20/23] drm/i915: Use atomic state in pipe_has_enabled_pch() Ander Conselvan de Oliveira
2015-03-04 15:55 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 21/23] drm/i915: Convert intel_pipe_will_have_type() to using atomic state Ander Conselvan de Oliveira
2015-03-04 16:03 ` Daniel Vetter
2015-03-04 16:51 ` Conselvan De Oliveira, Ander
2015-03-04 16:57 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 22/23] drm/i915: Don't look at staged config crtc when changing DRRS state Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 23/23] drm/i915: Remove usage of encoder->new_crtc from clock computations Ander Conselvan de Oliveira
2015-03-04 7:22 ` shuang.he
2015-03-04 15:21 ` [PATCH 00/23] Remove depencies on staged config for atomic transition Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426163321.24210.1.camel@gmail.com \
--to=conselvan2@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.