dri-devel Digest, Vol 63, Issue 41

vinay simha vinaysimha at inforcecomputing.com
Thu Jun 4 05:33:01 PDT 2015


hi,

where is the kernel.git for dri-devel ? so that i can git clone the
kernel sources?

Regards,
vinay simha


On Thu, Jun 4, 2015 at 4:36 PM,
<dri-devel-request at lists.freedesktop.org> wrote:
> Send dri-devel mailing list submissions to
>         dri-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.freedesktop.org/mailman/listinfo/dri-devel
> or, via email, send a message with subject or body 'help' to
>         dri-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>         dri-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dri-devel digest..."
>
>
> Today's Topics:
>
>    1. [PATCHv2 20/45] drm: omapdrm: Replace encoder mode_fixup with
>       atomic_check (Tomi Valkeinen)
>    2. [PATCHv2 27/45] drm: omapdrm: Remove omap_crtc enabled field
>       (Tomi Valkeinen)
>    3. [PATCHv2 36/45] drm: omapdrm: Don't flush CRTC when enabling
>       or disabling it (Tomi Valkeinen)
>    4. [PATCHv2 40/45] drm: omapdrm: if omap_plane_atomic_update
>       fails, disable plane (Tomi Valkeinen)
>    5. [PATCHv2 14/45] drm: omapdrm: Wire up atomic state object
>       scaffolding (Tomi Valkeinen)
>    6. [PATCHv2 17/45] drm: omapdrm: Switch plane update to atomic
>       helpers (Tomi Valkeinen)
>    7. [PATCHv2 18/45] drm: omapdrm: Switch mode config to atomic
>       helpers (Tomi Valkeinen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 4 Jun 2015 12:02:37 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 20/45] drm: omapdrm: Replace encoder mode_fixup with
>         atomic_check
> Message-ID: <1433408582-9828-21-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> The encoder .mode_fixup() operation is legacy, atomic updates uses the
> new .atomic_check() operation. Convert the encoder driver.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_encoder.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
> index 2aeb41f0881a..54847ed089ef 100644
> --- a/drivers/gpu/drm/omapdrm/omap_encoder.c
> +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
> @@ -62,13 +62,6 @@ static const struct drm_encoder_funcs omap_encoder_funcs = {
>         .destroy = omap_encoder_destroy,
>  };
>
> -static bool omap_encoder_mode_fixup(struct drm_encoder *encoder,
> -                                 const struct drm_display_mode *mode,
> -                                 struct drm_display_mode *adjusted_mode)
> -{
> -       return true;
> -}
> -
>  static void omap_encoder_mode_set(struct drm_encoder *encoder,
>                                 struct drm_display_mode *mode,
>                                 struct drm_display_mode *adjusted_mode)
> @@ -117,11 +110,18 @@ static void omap_encoder_enable(struct drm_encoder *encoder)
>  {
>  }
>
> +static int omap_encoder_atomic_check(struct drm_encoder *encoder,
> +                                    struct drm_crtc_state *crtc_state,
> +                                    struct drm_connector_state *conn_state)
> +{
> +       return 0;
> +}
> +
>  static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = {
> -       .mode_fixup = omap_encoder_mode_fixup,
>         .mode_set = omap_encoder_mode_set,
>         .disable = omap_encoder_disable,
>         .enable = omap_encoder_enable,
> +       .atomic_check = omap_encoder_atomic_check,
>  };
>
>  /*
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 4 Jun 2015 12:02:44 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 27/45] drm: omapdrm: Remove omap_crtc enabled field
> Message-ID: <1433408582-9828-28-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> The field tracks the CRTC state to avoid double-enable or -disable. As
> the DRM atomic core guarantees that the CRTC enable and disable
> functions won't be called on an already enabled or disabled CRTC, such
> tracking isn't needed. Remove the enabled field.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 32 +++++++++-----------------------
>  1 file changed, 9 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 430bf64521f0..e93ed34dea33 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -46,7 +46,6 @@ struct omap_crtc {
>         struct omap_overlay_manager *mgr;
>
>         struct omap_video_timings timings;
> -       bool enabled;
>
>         struct omap_drm_irq vblank_irq;
>         struct omap_drm_irq error_irq;
> @@ -126,7 +125,7 @@ static void omap_crtc_dss_start_update(struct omap_overlay_manager *mgr)
>  {
>  }
>
> -/* Called only from omap_crtc_setup and suspend/resume handlers. */
> +/* Called only from omap_crtc_encoder_setup and suspend/resume handlers. */
>  static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable)
>  {
>         struct drm_device *dev = crtc->dev;
> @@ -385,14 +384,14 @@ int omap_crtc_flush(struct drm_crtc *crtc)
>         return 0;
>  }
>
> -static void omap_crtc_setup(struct drm_crtc *crtc)
> +static void omap_crtc_encoder_setup(struct drm_crtc *crtc, bool enable)
>  {
>         struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
>         struct omap_drm_private *priv = crtc->dev->dev_private;
>         struct drm_encoder *encoder = NULL;
>         unsigned int i;
>
> -       DBG("%s: enabled=%d", omap_crtc->name, omap_crtc->enabled);
> +       DBG("%s: enable=%d", omap_crtc->name, enable);
>
>         dispc_runtime_get();
>
> @@ -408,14 +407,11 @@ static void omap_crtc_setup(struct drm_crtc *crtc)
>
>         omap_crtc->current_encoder = encoder;
>
> -       if (!omap_crtc->enabled) {
> -               if (encoder)
> -                       omap_encoder_set_enabled(encoder, false);
> -       } else {
> -               if (encoder) {
> -                       omap_encoder_set_enabled(encoder, false);
> +       if (encoder) {
> +               omap_encoder_set_enabled(encoder, false);
> +               if (enable) {
>                         omap_encoder_update(encoder, omap_crtc->mgr,
> -                                       &omap_crtc->timings);
> +                                           &omap_crtc->timings);
>                         omap_encoder_set_enabled(encoder, true);
>                 }
>         }
> @@ -456,9 +452,6 @@ static void omap_crtc_enable(struct drm_crtc *crtc)
>
>         DBG("%s", omap_crtc->name);
>
> -       if (omap_crtc->enabled)
> -               return;
> -
>         /* Enable all planes associated with the CRTC. */
>         for (i = 0; i < priv->num_planes; i++) {
>                 struct drm_plane *plane = priv->planes[i];
> @@ -467,9 +460,7 @@ static void omap_crtc_enable(struct drm_crtc *crtc)
>                         WARN_ON(omap_plane_set_enable(plane, true));
>         }
>
> -       omap_crtc->enabled = true;
> -
> -       omap_crtc_setup(crtc);
> +       omap_crtc_encoder_setup(crtc, true);
>         omap_crtc_flush(crtc);
>
>         dispc_runtime_get();
> @@ -485,9 +476,6 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
>
>         DBG("%s", omap_crtc->name);
>
> -       if (!omap_crtc->enabled)
> -               return;
> -
>         omap_crtc_wait_page_flip(crtc);
>         dispc_runtime_get();
>         drm_crtc_vblank_off(crtc);
> @@ -501,9 +489,7 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
>                         WARN_ON(omap_plane_set_enable(plane, false));
>         }
>
> -       omap_crtc->enabled = false;
> -
> -       omap_crtc_setup(crtc);
> +       omap_crtc_encoder_setup(crtc, false);
>         omap_crtc_flush(crtc);
>  }
>
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 4 Jun 2015 12:02:53 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 36/45] drm: omapdrm: Don't flush CRTC when enabling
>         or disabling it
> Message-ID: <1433408582-9828-37-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> The omap_crtc_flush() call in omap_crtc_enable() and omap_crtc_disable()
> is a no-op, as the display manager is always disabled at this point. Just
> remove the function call.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 2236f52f8bc3..701406e1f0ee 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -405,8 +405,6 @@ static void omap_crtc_enable(struct drm_crtc *crtc)
>                         WARN_ON(omap_plane_setup(plane));
>         }
>
> -       omap_crtc_flush(crtc);
> -
>         drm_crtc_vblank_on(crtc);
>  }
>
> @@ -428,8 +426,6 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
>                 if (plane->crtc == crtc)
>                         WARN_ON(omap_plane_setup(plane));
>         }
> -
> -       omap_crtc_flush(crtc);
>  }
>
>  static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc)
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 4 Jun 2015 12:02:57 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 40/45] drm: omapdrm: if omap_plane_atomic_update
>         fails, disable plane
> Message-ID: <1433408582-9828-41-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> omap_plane_atomic_update() calls dispc_ovl_setup(), which can fail (but
> shouldn't). To make the code a bit more robust, make sure the plane gets
> disabled if dispc_ovl_setup() fails, as otherwise we might get illegal
> HW configuration leading to error interrupts.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_plane.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
> index b13fb2fd4a9a..cfa8276c4deb 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -132,8 +132,10 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
>         /* and finally, update omapdss: */
>         ret = dispc_ovl_setup(omap_plane->id, &info, false,
>                               omap_crtc_timings(state->crtc), false);
> -       if (WARN_ON(ret))
> +       if (WARN_ON(ret)) {
> +               dispc_ovl_enable(omap_plane->id, false);
>                 return;
> +       }
>
>         dispc_ovl_enable(omap_plane->id, true);
>  }
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 4 Jun 2015 12:02:31 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 14/45] drm: omapdrm: Wire up atomic state object
>         scaffolding
> Message-ID: <1433408582-9828-15-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> Hook up the default .reset(), .atomic_duplicate_state() and
> .atomic_free_state() helpers to ensure that state objects are properly
> created and destroyed, and call drm_mode_config_reset() at init time to
> create the initial state objects.
>
> Framebuffer reference count also gets maintained automatically by the
> transitional helpers except for the legacy page flip operation. Maintain
> it explicitly there.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_connector.c | 4 ++++
>  drivers/gpu/drm/omapdrm/omap_crtc.c      | 6 ++++++
>  drivers/gpu/drm/omapdrm/omap_drv.c       | 2 ++
>  drivers/gpu/drm/omapdrm/omap_plane.c     | 5 +++++
>  4 files changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
> index cd1b10d660ac..d170f0cb1aa9 100644
> --- a/drivers/gpu/drm/omapdrm/omap_connector.c
> +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
> @@ -17,6 +17,7 @@
>   * this program.  If not, see <http://www.gnu.org/licenses/>.
>   */
>
> +#include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_crtc_helper.h>
>
> @@ -260,9 +261,12 @@ struct drm_encoder *omap_connector_attached_encoder(
>
>  static const struct drm_connector_funcs omap_connector_funcs = {
>         .dpms = drm_helper_connector_dpms,
> +       .reset = drm_atomic_helper_connector_reset,
>         .detect = omap_connector_detect,
>         .fill_modes = drm_helper_probe_single_connector_modes,
>         .destroy = omap_connector_destroy,
> +       .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> +       .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>
>  static const struct drm_connector_helper_funcs omap_connector_helper_funcs = {
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 0359a67f8f8d..5f4f5ad93345 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -19,6 +19,8 @@
>
>  #include <linux/completion.h>
>
> +#include <drm/drm_atomic.h>
> +#include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_mode.h>
> @@ -742,6 +744,7 @@ static int omap_crtc_page_flip(struct drm_crtc *crtc,
>         omap_crtc->flip_event = event;
>         omap_crtc->flip_state = OMAP_PAGE_FLIP_WAIT;
>
> +       drm_atomic_set_fb_for_plane(primary->state, fb);
>         primary->fb = fb;
>
>         spin_unlock_irqrestore(&dev->event_lock, flags);
> @@ -771,10 +774,13 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
>  }
>
>  static const struct drm_crtc_funcs omap_crtc_funcs = {
> +       .reset = drm_atomic_helper_crtc_reset,
>         .set_config = drm_crtc_helper_set_config,
>         .destroy = omap_crtc_destroy,
>         .page_flip = omap_crtc_page_flip,
>         .set_property = omap_crtc_set_property,
> +       .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
> +       .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
>  };
>
>  static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index dbd304691281..5bf4b2b71126 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -350,6 +350,8 @@ static int omap_modeset_init(struct drm_device *dev)
>
>         dev->mode_config.funcs = &omap_mode_config_funcs;
>
> +       drm_mode_config_reset(dev);
> +
>         return 0;
>  }
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
> index 57d5b035d078..533dcc15f03c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -17,6 +17,8 @@
>   * this program.  If not, see <http://www.gnu.org/licenses/>.
>   */
>
> +#include <drm/drm_atomic_helper.h>
> +
>  #include "omap_dmm_tiler.h"
>  #include "omap_drv.h"
>
> @@ -287,8 +289,11 @@ int omap_plane_set_property(struct drm_plane *plane,
>  static const struct drm_plane_funcs omap_plane_funcs = {
>         .update_plane = omap_plane_update,
>         .disable_plane = omap_plane_disable,
> +       .reset = drm_atomic_helper_plane_reset,
>         .destroy = omap_plane_destroy,
>         .set_property = omap_plane_set_property,
> +       .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> +       .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>  };
>
>  static void omap_plane_error_irq(struct omap_drm_irq *irq, uint32_t irqstatus)
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 4 Jun 2015 12:02:34 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 17/45] drm: omapdrm: Switch plane update to atomic
>         helpers
> Message-ID: <1433408582-9828-18-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> This removes the legacy plane update code. Wire up the default atomic
> check and atomic commit mode config helpers as needed by the plane
> update atomic helpers.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c   | 3 +++
>  drivers/gpu/drm/omapdrm/omap_plane.c | 4 ++--
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 5bf4b2b71126..ec0ae4220e72 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -17,6 +17,7 @@
>   * this program.  If not, see <http://www.gnu.org/licenses/>.
>   */
>
> +#include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_fb_helper.h>
>
> @@ -58,6 +59,8 @@ static void omap_fb_output_poll_changed(struct drm_device *dev)
>  static const struct drm_mode_config_funcs omap_mode_config_funcs = {
>         .fb_create = omap_framebuffer_create,
>         .output_poll_changed = omap_fb_output_poll_changed,
> +       .atomic_check = drm_atomic_helper_check,
> +       .atomic_commit = drm_atomic_helper_commit,
>  };
>
>  static int get_connector_type(struct omap_dss_device *dssdev)
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
> index 7587bac1b222..fcc5d9603292 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -316,8 +316,8 @@ int omap_plane_set_property(struct drm_plane *plane,
>  }
>
>  static const struct drm_plane_funcs omap_plane_funcs = {
> -       .update_plane = drm_plane_helper_update,
> -       .disable_plane = drm_plane_helper_disable,
> +       .update_plane = drm_atomic_helper_update_plane,
> +       .disable_plane = drm_atomic_helper_disable_plane,
>         .reset = drm_atomic_helper_plane_reset,
>         .destroy = omap_plane_destroy,
>         .set_property = omap_plane_set_property,
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Message: 7
> Date: Thu, 4 Jun 2015 12:02:35 +0300
> From: Tomi Valkeinen <tomi.valkeinen at ti.com>
> To: <dri-devel at lists.freedesktop.org>, Laurent Pinchart
>         <laurent.pinchart at ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Subject: [PATCHv2 18/45] drm: omapdrm: Switch mode config to atomic
>         helpers
> Message-ID: <1433408582-9828-19-git-send-email-tomi.valkeinen at ti.com>
> Content-Type: text/plain
>
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> This removes the legacy mode config code. The CRTC and encoder prepare
> and commit operations are not used anymore, remove them.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c    | 37 +---------------------------------
>  drivers/gpu/drm/omapdrm/omap_encoder.c | 10 ---------
>  2 files changed, 1 insertion(+), 46 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 31d50533d538..68bf38bd0ce2 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -571,23 +571,6 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
>                         WARN_ON(omap_plane_set_enable(plane, false));
>         }
>
> -       /*
> -        * HACK: Unpin the primary plane frame buffer if we're disabled without
> -        * going through full mode set.
> -        * HACK: The legacy set config helper drm_crtc_helper_set_config() that
> -        * we still use calls the .disable() operation directly when called with
> -        * a NULL frame buffer (for instance from drm_fb_release()). As a result
> -        * the CRTC is disabled without going through a full mode set, and the
> -        * primary plane' framebuffer is kept pin. Unpin it manually here until
> -        * we switch to the atomic set config helper.
> -        */
> -       if (crtc->primary->fb) {
> -               const struct drm_plane_helper_funcs *funcs;
> -
> -               funcs = crtc->primary->helper_private;
> -               funcs->cleanup_fb(crtc->primary, crtc->primary->fb, NULL);
> -       }
> -
>         omap_crtc->enabled = false;
>
>         omap_crtc_setup(crtc);
> @@ -622,20 +605,6 @@ static void omap_crtc_dpms(struct drm_crtc *crtc, int mode)
>                 omap_crtc_disable(crtc);
>  }
>
> -static void omap_crtc_prepare(struct drm_crtc *crtc)
> -{
> -       struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
> -       DBG("%s", omap_crtc->name);
> -       omap_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
> -}
> -
> -static void omap_crtc_commit(struct drm_crtc *crtc)
> -{
> -       struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
> -       DBG("%s", omap_crtc->name);
> -       omap_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
> -}
> -
>  static void omap_crtc_atomic_begin(struct drm_crtc *crtc)
>  {
>         dispc_runtime_get();
> @@ -771,7 +740,7 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
>
>  static const struct drm_crtc_funcs omap_crtc_funcs = {
>         .reset = drm_atomic_helper_crtc_reset,
> -       .set_config = drm_crtc_helper_set_config,
> +       .set_config = drm_atomic_helper_set_config,
>         .destroy = omap_crtc_destroy,
>         .page_flip = omap_crtc_page_flip,
>         .set_property = omap_crtc_set_property,
> @@ -782,11 +751,7 @@ static const struct drm_crtc_funcs omap_crtc_funcs = {
>  static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = {
>         .dpms = omap_crtc_dpms,
>         .mode_fixup = omap_crtc_mode_fixup,
> -       .mode_set = drm_helper_crtc_mode_set,
> -       .prepare = omap_crtc_prepare,
> -       .commit = omap_crtc_commit,
>         .mode_set_nofb = omap_crtc_mode_set_nofb,
> -       .mode_set_base = drm_helper_crtc_mode_set_base,
>         .disable = omap_crtc_disable,
>         .enable = omap_crtc_enable,
>         .atomic_begin = omap_crtc_atomic_begin,
> diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
> index 0734527808d5..96459f709147 100644
> --- a/drivers/gpu/drm/omapdrm/omap_encoder.c
> +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
> @@ -116,14 +116,6 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
>         }
>  }
>
> -static void omap_encoder_prepare(struct drm_encoder *encoder)
> -{
> -}
> -
> -static void omap_encoder_commit(struct drm_encoder *encoder)
> -{
> -}
> -
>  static void omap_encoder_disable(struct drm_encoder *encoder)
>  {
>  }
> @@ -136,8 +128,6 @@ static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = {
>         .dpms = omap_encoder_dpms,
>         .mode_fixup = omap_encoder_mode_fixup,
>         .mode_set = omap_encoder_mode_set,
> -       .prepare = omap_encoder_prepare,
> -       .commit = omap_encoder_commit,
>         .disable = omap_encoder_disable,
>         .enable = omap_encoder_enable,
>  };
> --
> 2.1.4
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
> ------------------------------
>
> End of dri-devel Digest, Vol 63, Issue 41
> *****************************************


More information about the dri-devel mailing list