From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BA2CC33CB3 for ; Wed, 15 Jan 2020 09:41:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71E4A24671 for ; Wed, 15 Jan 2020 09:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729143AbgAOJlz (ORCPT ); Wed, 15 Jan 2020 04:41:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:58248 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729459AbgAOJly (ORCPT ); Wed, 15 Jan 2020 04:41:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B23ADACCA; Wed, 15 Jan 2020 09:41:50 +0000 (UTC) Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Date: Wed, 15 Jan 2020 10:41:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe" Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: multipart/mixed; boundary="hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr"; protected-headers="v1" From: Thomas Zimmermann To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> In-Reply-To: --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann = wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in= >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> >=20 > I would prefer to just change the signature of > amdgpu_display_get_crtc_scanoutpos() to match the new API rather than > wrapping it again. While trying to adapt the siganture, I found that amdgpu_display_get_crtc_scanoutpos() requires a flags argument that is not mappable to the callback API. That wrapper function is necessary. Best regards Thomas >=20 > Alex >=20 >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++++++++++++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ----------- >> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +++++ >> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- >> 9 files changed, 24 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_display.c >> index 4e699071d144..a1e769d4417d 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -914,3 +914,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct am= dgpu_device *adev, int crtc) >> return AMDGPU_CRTC_IRQ_NONE; >> } >> } >> + >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> +{ >> + struct drm_device *dev =3D crtc->dev; >> + unsigned int pipe =3D crtc->index; >> + >> + return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> + stime, etime, mode);= >> +} >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_drv.c >> index 3f6f14ce1511..0749285dd1c7 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> @@ -1367,16 +1367,6 @@ int amdgpu_file_to_fpriv(struct file *filp, str= uct amdgpu_fpriv **fpriv) >> return 0; >> } >> >> -static bool >> -amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int= pipe, >> - bool in_vblank_irq, int *vpos, int *h= pos, >> - ktime_t *stime, ktime_t *etime, >> - const struct drm_display_mode *mode) >> -{ >> - return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> - stime, etime, mode);= >> -} >> - >> static struct drm_driver kms_driver =3D { >> .driver_features =3D >> DRIVER_USE_AGP | DRIVER_ATOMIC | >> @@ -1391,7 +1381,6 @@ static struct drm_driver kms_driver =3D { >> .enable_vblank =3D amdgpu_enable_vblank_kms, >> .disable_vblank =3D amdgpu_disable_vblank_kms, >> .get_vblank_timestamp =3D drm_calc_vbltimestamp_from_scanoutpo= s, >> - .get_scanout_position =3D amdgpu_get_crtc_scanout_position, >> .irq_handler =3D amdgpu_irq_handler, >> .ioctls =3D amdgpu_ioctls_kms, >> .gem_free_object_unlocked =3D amdgpu_gem_object_free, >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_mode.h >> index eb9975f4decb..37ba07e2feb5 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> @@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *= encoder, >> struct drm_display_mode *adjusted_mode); >> int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, i= nt crtc); >> >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode); >> + >> /* fbdev layer */ >> int amdgpu_fbdev_init(struct amdgpu_device *adev); >> void amdgpu_fbdev_fini(struct amdgpu_device *adev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v10_0.c >> index 40d2ac723dd6..bdc1e0f036d4 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> @@ -2685,6 +2685,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 0_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v10_0_crtc_prepare, >> .commit =3D dce_v10_0_crtc_commit, >> .disable =3D dce_v10_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v10_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v11_0.c >> index 898ef72d423c..0319da5f7bf9 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> @@ -2793,6 +2793,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 1_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v11_0_crtc_prepare, >> .commit =3D dce_v11_0_crtc_commit, >> .disable =3D dce_v11_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v11_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v6_0.c >> index db15a112becc..78642c3b14fc 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> @@ -2575,6 +2575,7 @@ static const struct drm_crtc_helper_funcs dce_v6= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v6_0_crtc_prepare, >> .commit =3D dce_v6_0_crtc_commit, >> .disable =3D dce_v6_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v6_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v8_0.c >> index f06c9022c1fd..1e8d4975435a 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> @@ -2593,6 +2593,7 @@ static const struct drm_crtc_helper_funcs dce_v8= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v8_0_crtc_prepare, >> .commit =3D dce_v8_0_crtc_commit, >> .disable =3D dce_v8_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v8_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/dr= m/amd/amdgpu/dce_virtual.c >> index e4f94863332c..4b2f915aba47 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> @@ -218,6 +218,7 @@ static const struct drm_crtc_helper_funcs dce_virt= ual_crtc_helper_funcs =3D { >> .prepare =3D dce_virtual_crtc_prepare, >> .commit =3D dce_virtual_crtc_commit, >> .disable =3D dce_virtual_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_virtual_crtc_init(struct amdgpu_device *adev, int inde= x) >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive= rs/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index f2db400a3920..39c5cf242c1b 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -4821,7 +4821,8 @@ static bool dm_crtc_helper_mode_fixup(struct drm= _crtc *crtc, >> static const struct drm_crtc_helper_funcs amdgpu_dm_crtc_helper_funcs= =3D { >> .disable =3D dm_crtc_helper_disable, >> .atomic_check =3D dm_crtc_helper_atomic_check, >> - .mode_fixup =3D dm_crtc_helper_mode_fixup >> + .mode_fixup =3D dm_crtc_helper_mode_fixup, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static void dm_encoder_helper_disable(struct drm_encoder *encoder) >> -- >> 2.24.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr-- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl4e3lkACgkQaA3BHVML eiP8ewgAkCwQLDL1l348xgKdfkrpjWjCtMh44wzfQJmfXQ15j9+oEj/YDNuVDukC LrShbAsOqg4b3iDmzvVt9EI7cUqmXnX8K9NQI26zz4/wlwFnxNhD/5PET+EP2nbx /4RPoZNn/AP0Jk82haua43kAJ2J+6gKuKM98zKM0HKUY3pPiyp3S7rO1sxY/WyDv q0llBcL4tTU/bD+kpgUkLeU6UtEOdrHe3DWMigY00zcWZmg8yuuFZ311UiNsdrBC Bf99ZpXB4Ag49J+qAyHgsuwQWnksKqjh5QXYNa0J6GmPRrqcVSGEfhq1EY96LWWB 3ab+VuRvH7uc/4soFiKK5DrszZEfcQ== =1LvZ -----END PGP SIGNATURE----- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Zimmermann Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Date: Wed, 15 Jan 2020 10:41:45 +0100 Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe" Return-path: In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , Wentla List-Id: nouveau.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: multipart/mixed; boundary="hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr"; protected-headers="v1" From: Thomas Zimmermann To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> In-Reply-To: --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann = wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in= >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> >=20 > I would prefer to just change the signature of > amdgpu_display_get_crtc_scanoutpos() to match the new API rather than > wrapping it again. While trying to adapt the siganture, I found that amdgpu_display_get_crtc_scanoutpos() requires a flags argument that is not mappable to the callback API. That wrapper function is necessary. Best regards Thomas >=20 > Alex >=20 >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++++++++++++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ----------- >> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +++++ >> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- >> 9 files changed, 24 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_display.c >> index 4e699071d144..a1e769d4417d 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -914,3 +914,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct am= dgpu_device *adev, int crtc) >> return AMDGPU_CRTC_IRQ_NONE; >> } >> } >> + >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> +{ >> + struct drm_device *dev =3D crtc->dev; >> + unsigned int pipe =3D crtc->index; >> + >> + return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> + stime, etime, mode);= >> +} >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_drv.c >> index 3f6f14ce1511..0749285dd1c7 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> @@ -1367,16 +1367,6 @@ int amdgpu_file_to_fpriv(struct file *filp, str= uct amdgpu_fpriv **fpriv) >> return 0; >> } >> >> -static bool >> -amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int= pipe, >> - bool in_vblank_irq, int *vpos, int *h= pos, >> - ktime_t *stime, ktime_t *etime, >> - const struct drm_display_mode *mode) >> -{ >> - return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> - stime, etime, mode);= >> -} >> - >> static struct drm_driver kms_driver =3D { >> .driver_features =3D >> DRIVER_USE_AGP | DRIVER_ATOMIC | >> @@ -1391,7 +1381,6 @@ static struct drm_driver kms_driver =3D { >> .enable_vblank =3D amdgpu_enable_vblank_kms, >> .disable_vblank =3D amdgpu_disable_vblank_kms, >> .get_vblank_timestamp =3D drm_calc_vbltimestamp_from_scanoutpo= s, >> - .get_scanout_position =3D amdgpu_get_crtc_scanout_position, >> .irq_handler =3D amdgpu_irq_handler, >> .ioctls =3D amdgpu_ioctls_kms, >> .gem_free_object_unlocked =3D amdgpu_gem_object_free, >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_mode.h >> index eb9975f4decb..37ba07e2feb5 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> @@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *= encoder, >> struct drm_display_mode *adjusted_mode); >> int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, i= nt crtc); >> >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode); >> + >> /* fbdev layer */ >> int amdgpu_fbdev_init(struct amdgpu_device *adev); >> void amdgpu_fbdev_fini(struct amdgpu_device *adev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v10_0.c >> index 40d2ac723dd6..bdc1e0f036d4 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> @@ -2685,6 +2685,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 0_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v10_0_crtc_prepare, >> .commit =3D dce_v10_0_crtc_commit, >> .disable =3D dce_v10_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v10_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v11_0.c >> index 898ef72d423c..0319da5f7bf9 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> @@ -2793,6 +2793,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 1_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v11_0_crtc_prepare, >> .commit =3D dce_v11_0_crtc_commit, >> .disable =3D dce_v11_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v11_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v6_0.c >> index db15a112becc..78642c3b14fc 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> @@ -2575,6 +2575,7 @@ static const struct drm_crtc_helper_funcs dce_v6= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v6_0_crtc_prepare, >> .commit =3D dce_v6_0_crtc_commit, >> .disable =3D dce_v6_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v6_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v8_0.c >> index f06c9022c1fd..1e8d4975435a 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> @@ -2593,6 +2593,7 @@ static const struct drm_crtc_helper_funcs dce_v8= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v8_0_crtc_prepare, >> .commit =3D dce_v8_0_crtc_commit, >> .disable =3D dce_v8_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v8_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/dr= m/amd/amdgpu/dce_virtual.c >> index e4f94863332c..4b2f915aba47 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> @@ -218,6 +218,7 @@ static const struct drm_crtc_helper_funcs dce_virt= ual_crtc_helper_funcs =3D { >> .prepare =3D dce_virtual_crtc_prepare, >> .commit =3D dce_virtual_crtc_commit, >> .disable =3D dce_virtual_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_virtual_crtc_init(struct amdgpu_device *adev, int inde= x) >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive= rs/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index f2db400a3920..39c5cf242c1b 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -4821,7 +4821,8 @@ static bool dm_crtc_helper_mode_fixup(struct drm= _crtc *crtc, >> static const struct drm_crtc_helper_funcs amdgpu_dm_crtc_helper_funcs= =3D { >> .disable =3D dm_crtc_helper_disable, >> .atomic_check =3D dm_crtc_helper_atomic_check, >> - .mode_fixup =3D dm_crtc_helper_mode_fixup >> + .mode_fixup =3D dm_crtc_helper_mode_fixup, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static void dm_encoder_helper_disable(struct drm_encoder *encoder) >> -- >> 2.24.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr-- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl4e3lkACgkQaA3BHVML eiP8ewgAkCwQLDL1l348xgKdfkrpjWjCtMh44wzfQJmfXQ15j9+oEj/YDNuVDukC LrShbAsOqg4b3iDmzvVt9EI7cUqmXnX8K9NQI26zz4/wlwFnxNhD/5PET+EP2nbx /4RPoZNn/AP0Jk82haua43kAJ2J+6gKuKM98zKM0HKUY3pPiyp3S7rO1sxY/WyDv q0llBcL4tTU/bD+kpgUkLeU6UtEOdrHe3DWMigY00zcWZmg8yuuFZ311UiNsdrBC Bf99ZpXB4Ag49J+qAyHgsuwQWnksKqjh5QXYNa0J6GmPRrqcVSGEfhq1EY96LWWB 3ab+VuRvH7uc/4soFiKK5DrszZEfcQ== =1LvZ -----END PGP SIGNATURE----- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 857F1C33CB1 for ; Wed, 15 Jan 2020 09:41:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 668D024671 for ; Wed, 15 Jan 2020 09:41:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 668D024671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E7DA6E8D6; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28596E8CE; Wed, 15 Jan 2020 09:41:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B23ADACCA; Wed, 15 Jan 2020 09:41:50 +0000 (UTC) Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() To: Alex Deucher References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Date: Wed, 15 Jan 2020 10:41:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hamohammed.sa@gmail.com, Dave Airlie , nouveau , Maling list - DRI developers , amd-gfx list , alexandre.torgue@st.com, Thomas Hellstrom , Sean Paul , VMware Graphics , Ben Skeggs , mcoquelin.stm32@gmail.com, "Leo \(Sunpeng\) Li" , linux-arm-msm , Intel Graphics Development , Rodrigo Vivi , Vincent Abriou , rodrigosiqueiramelo@gmail.com, philippe.cornu@st.com, yannick.fertre@st.com, "Deucher, Alexander" , freedreno , Christian Koenig Content-Type: multipart/mixed; boundary="===============1879856863==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1879856863== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: multipart/mixed; boundary="hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr"; protected-headers="v1" From: Thomas Zimmermann To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> In-Reply-To: --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann = wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in= >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> >=20 > I would prefer to just change the signature of > amdgpu_display_get_crtc_scanoutpos() to match the new API rather than > wrapping it again. While trying to adapt the siganture, I found that amdgpu_display_get_crtc_scanoutpos() requires a flags argument that is not mappable to the callback API. That wrapper function is necessary. Best regards Thomas >=20 > Alex >=20 >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++++++++++++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ----------- >> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +++++ >> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- >> 9 files changed, 24 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_display.c >> index 4e699071d144..a1e769d4417d 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -914,3 +914,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct am= dgpu_device *adev, int crtc) >> return AMDGPU_CRTC_IRQ_NONE; >> } >> } >> + >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> +{ >> + struct drm_device *dev =3D crtc->dev; >> + unsigned int pipe =3D crtc->index; >> + >> + return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> + stime, etime, mode);= >> +} >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_drv.c >> index 3f6f14ce1511..0749285dd1c7 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> @@ -1367,16 +1367,6 @@ int amdgpu_file_to_fpriv(struct file *filp, str= uct amdgpu_fpriv **fpriv) >> return 0; >> } >> >> -static bool >> -amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int= pipe, >> - bool in_vblank_irq, int *vpos, int *h= pos, >> - ktime_t *stime, ktime_t *etime, >> - const struct drm_display_mode *mode) >> -{ >> - return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> - stime, etime, mode);= >> -} >> - >> static struct drm_driver kms_driver =3D { >> .driver_features =3D >> DRIVER_USE_AGP | DRIVER_ATOMIC | >> @@ -1391,7 +1381,6 @@ static struct drm_driver kms_driver =3D { >> .enable_vblank =3D amdgpu_enable_vblank_kms, >> .disable_vblank =3D amdgpu_disable_vblank_kms, >> .get_vblank_timestamp =3D drm_calc_vbltimestamp_from_scanoutpo= s, >> - .get_scanout_position =3D amdgpu_get_crtc_scanout_position, >> .irq_handler =3D amdgpu_irq_handler, >> .ioctls =3D amdgpu_ioctls_kms, >> .gem_free_object_unlocked =3D amdgpu_gem_object_free, >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_mode.h >> index eb9975f4decb..37ba07e2feb5 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> @@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *= encoder, >> struct drm_display_mode *adjusted_mode); >> int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, i= nt crtc); >> >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode); >> + >> /* fbdev layer */ >> int amdgpu_fbdev_init(struct amdgpu_device *adev); >> void amdgpu_fbdev_fini(struct amdgpu_device *adev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v10_0.c >> index 40d2ac723dd6..bdc1e0f036d4 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> @@ -2685,6 +2685,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 0_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v10_0_crtc_prepare, >> .commit =3D dce_v10_0_crtc_commit, >> .disable =3D dce_v10_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v10_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v11_0.c >> index 898ef72d423c..0319da5f7bf9 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> @@ -2793,6 +2793,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 1_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v11_0_crtc_prepare, >> .commit =3D dce_v11_0_crtc_commit, >> .disable =3D dce_v11_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v11_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v6_0.c >> index db15a112becc..78642c3b14fc 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> @@ -2575,6 +2575,7 @@ static const struct drm_crtc_helper_funcs dce_v6= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v6_0_crtc_prepare, >> .commit =3D dce_v6_0_crtc_commit, >> .disable =3D dce_v6_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v6_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v8_0.c >> index f06c9022c1fd..1e8d4975435a 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> @@ -2593,6 +2593,7 @@ static const struct drm_crtc_helper_funcs dce_v8= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v8_0_crtc_prepare, >> .commit =3D dce_v8_0_crtc_commit, >> .disable =3D dce_v8_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v8_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/dr= m/amd/amdgpu/dce_virtual.c >> index e4f94863332c..4b2f915aba47 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> @@ -218,6 +218,7 @@ static const struct drm_crtc_helper_funcs dce_virt= ual_crtc_helper_funcs =3D { >> .prepare =3D dce_virtual_crtc_prepare, >> .commit =3D dce_virtual_crtc_commit, >> .disable =3D dce_virtual_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_virtual_crtc_init(struct amdgpu_device *adev, int inde= x) >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive= rs/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index f2db400a3920..39c5cf242c1b 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -4821,7 +4821,8 @@ static bool dm_crtc_helper_mode_fixup(struct drm= _crtc *crtc, >> static const struct drm_crtc_helper_funcs amdgpu_dm_crtc_helper_funcs= =3D { >> .disable =3D dm_crtc_helper_disable, >> .atomic_check =3D dm_crtc_helper_atomic_check, >> - .mode_fixup =3D dm_crtc_helper_mode_fixup >> + .mode_fixup =3D dm_crtc_helper_mode_fixup, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static void dm_encoder_helper_disable(struct drm_encoder *encoder) >> -- >> 2.24.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr-- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl4e3lkACgkQaA3BHVML eiP8ewgAkCwQLDL1l348xgKdfkrpjWjCtMh44wzfQJmfXQ15j9+oEj/YDNuVDukC LrShbAsOqg4b3iDmzvVt9EI7cUqmXnX8K9NQI26zz4/wlwFnxNhD/5PET+EP2nbx /4RPoZNn/AP0Jk82haua43kAJ2J+6gKuKM98zKM0HKUY3pPiyp3S7rO1sxY/WyDv q0llBcL4tTU/bD+kpgUkLeU6UtEOdrHe3DWMigY00zcWZmg8yuuFZ311UiNsdrBC Bf99ZpXB4Ag49J+qAyHgsuwQWnksKqjh5QXYNa0J6GmPRrqcVSGEfhq1EY96LWWB 3ab+VuRvH7uc/4soFiKK5DrszZEfcQ== =1LvZ -----END PGP SIGNATURE----- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe-- --===============1879856863== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1879856863==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94799C33CB1 for ; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74C2F24671 for ; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74C2F24671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E06B6E8D0; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28596E8CE; Wed, 15 Jan 2020 09:41:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B23ADACCA; Wed, 15 Jan 2020 09:41:50 +0000 (UTC) To: Alex Deucher References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Date: Wed, 15 Jan 2020 10:41:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Subject: Re: [Intel-gfx] [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hamohammed.sa@gmail.com, Dave Airlie , nouveau , Maling list - DRI developers , Eric Anholt , amd-gfx list , Benjamin Gaignard , alexandre.torgue@st.com, Chunming Zhou , Thomas Hellstrom , VMware Graphics , Ben Skeggs , "Wentland, Harry" , mcoquelin.stm32@gmail.com, "Leo \(Sunpeng\) Li" , linux-arm-msm , Intel Graphics Development , Vincent Abriou , rodrigosiqueiramelo@gmail.com, philippe.cornu@st.com, yannick.fertre@st.com, "Deucher, Alexander" , freedreno , Christian Koenig Content-Type: multipart/mixed; boundary="===============1893279031==" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1893279031== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: multipart/mixed; boundary="hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr"; protected-headers="v1" From: Thomas Zimmermann To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> In-Reply-To: --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann = wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in= >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> >=20 > I would prefer to just change the signature of > amdgpu_display_get_crtc_scanoutpos() to match the new API rather than > wrapping it again. While trying to adapt the siganture, I found that amdgpu_display_get_crtc_scanoutpos() requires a flags argument that is not mappable to the callback API. That wrapper function is necessary. Best regards Thomas >=20 > Alex >=20 >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++++++++++++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ----------- >> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +++++ >> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- >> 9 files changed, 24 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_display.c >> index 4e699071d144..a1e769d4417d 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -914,3 +914,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct am= dgpu_device *adev, int crtc) >> return AMDGPU_CRTC_IRQ_NONE; >> } >> } >> + >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> +{ >> + struct drm_device *dev =3D crtc->dev; >> + unsigned int pipe =3D crtc->index; >> + >> + return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> + stime, etime, mode);= >> +} >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_drv.c >> index 3f6f14ce1511..0749285dd1c7 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> @@ -1367,16 +1367,6 @@ int amdgpu_file_to_fpriv(struct file *filp, str= uct amdgpu_fpriv **fpriv) >> return 0; >> } >> >> -static bool >> -amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int= pipe, >> - bool in_vblank_irq, int *vpos, int *h= pos, >> - ktime_t *stime, ktime_t *etime, >> - const struct drm_display_mode *mode) >> -{ >> - return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> - stime, etime, mode);= >> -} >> - >> static struct drm_driver kms_driver =3D { >> .driver_features =3D >> DRIVER_USE_AGP | DRIVER_ATOMIC | >> @@ -1391,7 +1381,6 @@ static struct drm_driver kms_driver =3D { >> .enable_vblank =3D amdgpu_enable_vblank_kms, >> .disable_vblank =3D amdgpu_disable_vblank_kms, >> .get_vblank_timestamp =3D drm_calc_vbltimestamp_from_scanoutpo= s, >> - .get_scanout_position =3D amdgpu_get_crtc_scanout_position, >> .irq_handler =3D amdgpu_irq_handler, >> .ioctls =3D amdgpu_ioctls_kms, >> .gem_free_object_unlocked =3D amdgpu_gem_object_free, >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_mode.h >> index eb9975f4decb..37ba07e2feb5 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> @@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *= encoder, >> struct drm_display_mode *adjusted_mode); >> int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, i= nt crtc); >> >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode); >> + >> /* fbdev layer */ >> int amdgpu_fbdev_init(struct amdgpu_device *adev); >> void amdgpu_fbdev_fini(struct amdgpu_device *adev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v10_0.c >> index 40d2ac723dd6..bdc1e0f036d4 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> @@ -2685,6 +2685,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 0_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v10_0_crtc_prepare, >> .commit =3D dce_v10_0_crtc_commit, >> .disable =3D dce_v10_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v10_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v11_0.c >> index 898ef72d423c..0319da5f7bf9 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> @@ -2793,6 +2793,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 1_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v11_0_crtc_prepare, >> .commit =3D dce_v11_0_crtc_commit, >> .disable =3D dce_v11_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v11_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v6_0.c >> index db15a112becc..78642c3b14fc 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> @@ -2575,6 +2575,7 @@ static const struct drm_crtc_helper_funcs dce_v6= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v6_0_crtc_prepare, >> .commit =3D dce_v6_0_crtc_commit, >> .disable =3D dce_v6_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v6_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v8_0.c >> index f06c9022c1fd..1e8d4975435a 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> @@ -2593,6 +2593,7 @@ static const struct drm_crtc_helper_funcs dce_v8= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v8_0_crtc_prepare, >> .commit =3D dce_v8_0_crtc_commit, >> .disable =3D dce_v8_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v8_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/dr= m/amd/amdgpu/dce_virtual.c >> index e4f94863332c..4b2f915aba47 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> @@ -218,6 +218,7 @@ static const struct drm_crtc_helper_funcs dce_virt= ual_crtc_helper_funcs =3D { >> .prepare =3D dce_virtual_crtc_prepare, >> .commit =3D dce_virtual_crtc_commit, >> .disable =3D dce_virtual_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_virtual_crtc_init(struct amdgpu_device *adev, int inde= x) >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive= rs/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index f2db400a3920..39c5cf242c1b 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -4821,7 +4821,8 @@ static bool dm_crtc_helper_mode_fixup(struct drm= _crtc *crtc, >> static const struct drm_crtc_helper_funcs amdgpu_dm_crtc_helper_funcs= =3D { >> .disable =3D dm_crtc_helper_disable, >> .atomic_check =3D dm_crtc_helper_atomic_check, >> - .mode_fixup =3D dm_crtc_helper_mode_fixup >> + .mode_fixup =3D dm_crtc_helper_mode_fixup, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static void dm_encoder_helper_disable(struct drm_encoder *encoder) >> -- >> 2.24.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr-- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl4e3lkACgkQaA3BHVML eiP8ewgAkCwQLDL1l348xgKdfkrpjWjCtMh44wzfQJmfXQ15j9+oEj/YDNuVDukC LrShbAsOqg4b3iDmzvVt9EI7cUqmXnX8K9NQI26zz4/wlwFnxNhD/5PET+EP2nbx /4RPoZNn/AP0Jk82haua43kAJ2J+6gKuKM98zKM0HKUY3pPiyp3S7rO1sxY/WyDv q0llBcL4tTU/bD+kpgUkLeU6UtEOdrHe3DWMigY00zcWZmg8yuuFZ311UiNsdrBC Bf99ZpXB4Ag49J+qAyHgsuwQWnksKqjh5QXYNa0J6GmPRrqcVSGEfhq1EY96LWWB 3ab+VuRvH7uc/4soFiKK5DrszZEfcQ== =1LvZ -----END PGP SIGNATURE----- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe-- --===============1893279031== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1893279031==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FECAC47409 for ; Wed, 15 Jan 2020 09:41:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0C2724671 for ; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0C2724671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3028F6E8D3; Wed, 15 Jan 2020 09:41:54 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28596E8CE; Wed, 15 Jan 2020 09:41:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B23ADACCA; Wed, 15 Jan 2020 09:41:50 +0000 (UTC) Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() To: Alex Deucher References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Date: Wed, 15 Jan 2020 10:41:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hamohammed.sa@gmail.com, Dave Airlie , nouveau , Joonas Lahtinen , Maling list - DRI developers , Eric Anholt , amd-gfx list , Benjamin Gaignard , alexandre.torgue@st.com, Chunming Zhou , Thomas Hellstrom , Sean Paul , Patrik Jakobsson , VMware Graphics , Ben Skeggs , "Wentland, Harry" , mcoquelin.stm32@gmail.com, "Leo \(Sunpeng\) Li" , linux-arm-msm , Intel Graphics Development , Maarten Lankhorst , Jani Nikula , Rodrigo Vivi , Vincent Abriou , rodrigosiqueiramelo@gmail.com, philippe.cornu@st.com, yannick.fertre@st.com, Rob Clark , Daniel Vetter , "Deucher, Alexander" , freedreno , Christian Koenig Content-Type: multipart/mixed; boundary="===============1283933240==" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1283933240== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: multipart/mixed; boundary="hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr"; protected-headers="v1" From: Thomas Zimmermann To: Alex Deucher Cc: Dave Airlie , Daniel Vetter , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Maarten Lankhorst , Patrik Jakobsson , Rob Clark , Sean Paul , Benjamin Gaignard , Vincent Abriou , yannick.fertre@st.com, philippe.cornu@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Eric Anholt , rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com, VMware Graphics , Thomas Hellstrom , Ben Skeggs , "Wentland, Harry" , "Leo (Sunpeng) Li" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-arm-msm , Intel Graphics Development , amd-gfx list , Maling list - DRI developers , nouveau , freedreno Message-ID: <352f23e9-b690-375f-005b-e5ea1fb9a0d2@suse.de> Subject: Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() References: <20200110092127.27847-1-tzimmermann@suse.de> <20200110092127.27847-3-tzimmermann@suse.de> In-Reply-To: --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann = wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in= >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> >=20 > I would prefer to just change the signature of > amdgpu_display_get_crtc_scanoutpos() to match the new API rather than > wrapping it again. While trying to adapt the siganture, I found that amdgpu_display_get_crtc_scanoutpos() requires a flags argument that is not mappable to the callback API. That wrapper function is necessary. Best regards Thomas >=20 > Alex >=20 >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++++++++++++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 ----------- >> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +++++ >> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + >> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- >> 9 files changed, 24 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_display.c >> index 4e699071d144..a1e769d4417d 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -914,3 +914,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct am= dgpu_device *adev, int crtc) >> return AMDGPU_CRTC_IRQ_NONE; >> } >> } >> + >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> +{ >> + struct drm_device *dev =3D crtc->dev; >> + unsigned int pipe =3D crtc->index; >> + >> + return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> + stime, etime, mode);= >> +} >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_drv.c >> index 3f6f14ce1511..0749285dd1c7 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c >> @@ -1367,16 +1367,6 @@ int amdgpu_file_to_fpriv(struct file *filp, str= uct amdgpu_fpriv **fpriv) >> return 0; >> } >> >> -static bool >> -amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int= pipe, >> - bool in_vblank_irq, int *vpos, int *h= pos, >> - ktime_t *stime, ktime_t *etime, >> - const struct drm_display_mode *mode) >> -{ >> - return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, = hpos, >> - stime, etime, mode);= >> -} >> - >> static struct drm_driver kms_driver =3D { >> .driver_features =3D >> DRIVER_USE_AGP | DRIVER_ATOMIC | >> @@ -1391,7 +1381,6 @@ static struct drm_driver kms_driver =3D { >> .enable_vblank =3D amdgpu_enable_vblank_kms, >> .disable_vblank =3D amdgpu_disable_vblank_kms, >> .get_vblank_timestamp =3D drm_calc_vbltimestamp_from_scanoutpo= s, >> - .get_scanout_position =3D amdgpu_get_crtc_scanout_position, >> .irq_handler =3D amdgpu_irq_handler, >> .ioctls =3D amdgpu_ioctls_kms, >> .gem_free_object_unlocked =3D amdgpu_gem_object_free, >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/dr= m/amd/amdgpu/amdgpu_mode.h >> index eb9975f4decb..37ba07e2feb5 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h >> @@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *= encoder, >> struct drm_display_mode *adjusted_mode); >> int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, i= nt crtc); >> >> +bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc, >> + bool in_vblank_irq, int *vpos, >> + int *hpos, ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode); >> + >> /* fbdev layer */ >> int amdgpu_fbdev_init(struct amdgpu_device *adev); >> void amdgpu_fbdev_fini(struct amdgpu_device *adev); >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v10_0.c >> index 40d2ac723dd6..bdc1e0f036d4 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c >> @@ -2685,6 +2685,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 0_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v10_0_crtc_prepare, >> .commit =3D dce_v10_0_crtc_commit, >> .disable =3D dce_v10_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v10_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/= amd/amdgpu/dce_v11_0.c >> index 898ef72d423c..0319da5f7bf9 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c >> @@ -2793,6 +2793,7 @@ static const struct drm_crtc_helper_funcs dce_v1= 1_0_crtc_helper_funcs =3D { >> .prepare =3D dce_v11_0_crtc_prepare, >> .commit =3D dce_v11_0_crtc_commit, >> .disable =3D dce_v11_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v11_0_crtc_init(struct amdgpu_device *adev, int index)= >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v6_0.c >> index db15a112becc..78642c3b14fc 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c >> @@ -2575,6 +2575,7 @@ static const struct drm_crtc_helper_funcs dce_v6= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v6_0_crtc_prepare, >> .commit =3D dce_v6_0_crtc_commit, >> .disable =3D dce_v6_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v6_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/a= md/amdgpu/dce_v8_0.c >> index f06c9022c1fd..1e8d4975435a 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c >> @@ -2593,6 +2593,7 @@ static const struct drm_crtc_helper_funcs dce_v8= _0_crtc_helper_funcs =3D { >> .prepare =3D dce_v8_0_crtc_prepare, >> .commit =3D dce_v8_0_crtc_commit, >> .disable =3D dce_v8_0_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_v8_0_crtc_init(struct amdgpu_device *adev, int index) >> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/dr= m/amd/amdgpu/dce_virtual.c >> index e4f94863332c..4b2f915aba47 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c >> @@ -218,6 +218,7 @@ static const struct drm_crtc_helper_funcs dce_virt= ual_crtc_helper_funcs =3D { >> .prepare =3D dce_virtual_crtc_prepare, >> .commit =3D dce_virtual_crtc_commit, >> .disable =3D dce_virtual_crtc_disable, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static int dce_virtual_crtc_init(struct amdgpu_device *adev, int inde= x) >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drive= rs/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index f2db400a3920..39c5cf242c1b 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -4821,7 +4821,8 @@ static bool dm_crtc_helper_mode_fixup(struct drm= _crtc *crtc, >> static const struct drm_crtc_helper_funcs amdgpu_dm_crtc_helper_funcs= =3D { >> .disable =3D dm_crtc_helper_disable, >> .atomic_check =3D dm_crtc_helper_atomic_check, >> - .mode_fixup =3D dm_crtc_helper_mode_fixup >> + .mode_fixup =3D dm_crtc_helper_mode_fixup, >> + .get_scanout_position =3D amdgpu_crtc_get_scanout_position, >> }; >> >> static void dm_encoder_helper_disable(struct drm_encoder *encoder) >> -- >> 2.24.1 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --hPUoBqAOmv0dxCxy0IXWUFKEEwWWz1ZWr-- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl4e3lkACgkQaA3BHVML eiP8ewgAkCwQLDL1l348xgKdfkrpjWjCtMh44wzfQJmfXQ15j9+oEj/YDNuVDukC LrShbAsOqg4b3iDmzvVt9EI7cUqmXnX8K9NQI26zz4/wlwFnxNhD/5PET+EP2nbx /4RPoZNn/AP0Jk82haua43kAJ2J+6gKuKM98zKM0HKUY3pPiyp3S7rO1sxY/WyDv q0llBcL4tTU/bD+kpgUkLeU6UtEOdrHe3DWMigY00zcWZmg8yuuFZ311UiNsdrBC Bf99ZpXB4Ag49J+qAyHgsuwQWnksKqjh5QXYNa0J6GmPRrqcVSGEfhq1EY96LWWB 3ab+VuRvH7uc/4soFiKK5DrszZEfcQ== =1LvZ -----END PGP SIGNATURE----- --dLJlhcBYG9rKY2jGjJ8dRCg6xR3OKIVNe-- --===============1283933240== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx --===============1283933240==--