From patchwork Thu Jun 4 09:02:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 6545731 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B90FAC0020 for ; Thu, 4 Jun 2015 11:07:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2A3C207AE for ; Thu, 4 Jun 2015 11:07:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9BE30207B3 for ; Thu, 4 Jun 2015 11:06:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E0076EB22; Thu, 4 Jun 2015 04:06:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by gabe.freedesktop.org (Postfix) with ESMTP id AD4CB6EAD6 for ; Thu, 4 Jun 2015 02:04:03 -0700 (PDT) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t54940Wa032051; Thu, 4 Jun 2015 04:04:00 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t54940Q1011769; Thu, 4 Jun 2015 04:04:00 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Thu, 4 Jun 2015 04:04:00 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5493YwK014785; Thu, 4 Jun 2015 04:03:59 -0500 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 18/45] drm: omapdrm: Switch mode config to atomic helpers Date: Thu, 4 Jun 2015 12:02:35 +0300 Message-ID: <1433408582-9828-19-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433408582-9828-1-git-send-email-tomi.valkeinen@ti.com> References: <1433408582-9828-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 04 Jun 2015 04:06:34 -0700 Cc: Tomi Valkeinen X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurent Pinchart 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 Signed-off-by: Tomi Valkeinen --- 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, };