Received: by 10.213.65.68 with SMTP id h4csp984977imn; Sat, 7 Apr 2018 14:33:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ODm0tjBqw1/CDpogee/hTWNBU+1WCPD8IjyTaEHIcmVkBBYQrRyoEWdENW4M3NYd9qfRB X-Received: by 2002:a17:902:7688:: with SMTP id m8-v6mr22194677pll.340.1523136823769; Sat, 07 Apr 2018 14:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523136823; cv=none; d=google.com; s=arc-20160816; b=O1C01idR9YNI5rms2Tiz7UqdqpDvFXT1ZZ6mG3RyYXuhSxRvC9mvH3klc6kdmmJvaL F6m8QLoG6RseBVCv25GPeuEcvLT1/f848HtcM0Y3XKhHWMZ7YU7+3yBlTWuvG4rX61Jv utKzcFI65fpe4FRrwV/tPxyQ9/McAPq5/VnKGBivxAPVQXz2uqYZUqcDx1HQNONoCn74 CM6ph1FFedrJTx0zKbHVwx4gO+OQm3AgWFgOZ9ZY/yd0xoCU6tWvdPmmfy+G8vlYZSK2 YhwrCoCeHXP30kTRpFVHSrtPb46TGvp0iuJhn7ECzDcd32tkg4ROXLuIc9DMPlQtOyAc wDuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=OC0PZpnfIMvfm9TnrcRg+M2kXGgmji6Zz/ZYRff9sVY=; b=EzKNMJ9Q2WOD35D83hArvwmjthOTo46BR1rL7tlbJdmf/owM4duQnx6NtLhP/ZKuMX 6eccENC/5ZrghadGplC9FdSH3DEGjzg0JXKuedhHtEwmXIxYeFm2Uv0DX9lkNnYoKDIZ AjsyFnQCJ44MtN7OT2Z5OjzPu/KFNDX320EsSeJksmrb7AnwtzK1A55ThS9ZXCcFpXE0 kkrI24Ws8Yl64Ad+DlHHq6orIHlcCC+2EQvpcbuTrWCvPWKekuot4QYypMumrFk7hqyY ahgyfbZB9TGUPtFrWmbwFiaG8nonzWKk58z3YHiJHZjPpvUqWr6yJzlWlHGq8nwQVdNC HI6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si11247617pls.328.2018.04.07.14.33.06; Sat, 07 Apr 2018 14:33:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752080AbeDGVa0 (ORCPT + 99 others); Sat, 7 Apr 2018 17:30:26 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:44397 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751572AbeDGVaY (ORCPT ); Sat, 7 Apr 2018 17:30:24 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w37LTuK6026691; Sat, 7 Apr 2018 23:30:13 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2h6mvcb5ky-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 07 Apr 2018 23:30:13 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8844031; Sat, 7 Apr 2018 21:30:10 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5F56351F6; Sat, 7 Apr 2018 21:30:10 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 7 Apr 2018 23:30:10 +0200 Received: from localhost (10.129.5.9) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 7 Apr 2018 23:30:09 +0200 From: Philippe Cornu To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , David Airlie , , CC: Fabien Dessenne , Mickael Reulier , Alexandre Torgue Subject: [PATCH] drm/stm: move enable/disable_vblank to crtc Date: Sat, 7 Apr 2018 23:29:37 +0200 Message-ID: <20180407212937.30407-1-philippe.cornu@st.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.129.5.9] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-07_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org enable/disable_vblank() functions at drm_driver level are deprecated. Move them to the ltdc drm_crtc_funcs structure. Signed-off-by: Philippe Cornu --- drivers/gpu/drm/stm/drv.c | 2 -- drivers/gpu/drm/stm/ltdc.c | 10 ++++++---- drivers/gpu/drm/stm/ltdc.h | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 9ab00a87f7cc..8698e08313e1 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -72,8 +72,6 @@ static struct drm_driver drv_driver = { .gem_prime_vmap = drm_gem_cma_prime_vmap, .gem_prime_vunmap = drm_gem_cma_prime_vunmap, .gem_prime_mmap = drm_gem_cma_prime_mmap, - .enable_vblank = ltdc_crtc_enable_vblank, - .disable_vblank = ltdc_crtc_disable_vblank, }; static int drv_load(struct drm_device *ddev) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 1a3277e483d5..2b745cfc9000 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -569,9 +569,9 @@ static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { .atomic_disable = ltdc_crtc_atomic_disable, }; -int ltdc_crtc_enable_vblank(struct drm_device *ddev, unsigned int pipe) +static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc) { - struct ltdc_device *ldev = ddev->dev_private; + struct ltdc_device *ldev = crtc_to_ltdc(crtc); DRM_DEBUG_DRIVER("\n"); reg_set(ldev->regs, LTDC_IER, IER_LIE); @@ -579,9 +579,9 @@ int ltdc_crtc_enable_vblank(struct drm_device *ddev, unsigned int pipe) return 0; } -void ltdc_crtc_disable_vblank(struct drm_device *ddev, unsigned int pipe) +static void ltdc_crtc_disable_vblank(struct drm_crtc *crtc) { - struct ltdc_device *ldev = ddev->dev_private; + struct ltdc_device *ldev = crtc_to_ltdc(crtc); DRM_DEBUG_DRIVER("\n"); reg_clear(ldev->regs, LTDC_IER, IER_LIE); @@ -594,6 +594,8 @@ static const struct drm_crtc_funcs ltdc_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, + .enable_vblank = ltdc_crtc_enable_vblank, + .disable_vblank = ltdc_crtc_disable_vblank, .gamma_set = drm_atomic_helper_legacy_gamma_set, }; diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h index edb268129c54..61a80d00bc3b 100644 --- a/drivers/gpu/drm/stm/ltdc.h +++ b/drivers/gpu/drm/stm/ltdc.h @@ -29,8 +29,6 @@ struct ltdc_device { u32 irq_status; }; -int ltdc_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe); -void ltdc_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe); int ltdc_load(struct drm_device *ddev); void ltdc_unload(struct drm_device *ddev); -- 2.15.1