Re: [Freedreno] [PATCH] kgsl: advertise DRI2Info v4 for !NoKMS case
Small correction: the commit title should say NoKMS (no !). -Emil ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
[Freedreno] [PATCH] kgsl: advertise DRI2Info v4 for !NoKMS case
From: Emil Velikov As mentioned in the commit message, Xserver has sufficient fallbacks when the video driver does not implement ScheduleSwap, ScheduleWaitMSC and GetMSC. As such we can "fake it" and advertise v4, instead of the current v3. Cc: freedreno@lists.freedesktop.org Cc: Rob Clark Signed-off-by: Emil Velikov --- Rob, hope that you have a a2xx + kgsl + shim setup around and you can give this a try. --- src/msm-dri2.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/msm-dri2.c b/src/msm-dri2.c index 6f60c4d..e9a681b 100644 --- a/src/msm-dri2.c +++ b/src/msm-dri2.c @@ -596,7 +596,16 @@ MSMDRI2ScreenInit(ScreenPtr pScreen) if (pMsm->NoKMS) { info.driverName = "kgsl"; - info.version = 3; +/* Driver does not have KMS, so strictly speaking we should + * use v3 here. + * + * Although X server is smart enough to use appropriate + * fallbacks, regardless of the version exposed. + * + * Bump to v4, since that allows us to simplify other + * components such as Mesa. + */ + info.version = 4; } else { info.driverName = "msm"; info.version = 6; -- 2.13.3 ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [PATCH 2/3] drm/msm/mdp5: mark runtime_pm functions as __maybe_unused
On 08/03/2017 05:20 PM, Arnd Bergmann wrote: When CONFIG_PM is disabled, we get harmless warnings about unused functions: drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1025:12: error: 'mdp5_runtime_resume' defined but not used [-Werror=unused-function] static int mdp5_runtime_resume(struct device *dev) ^~~ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1015:12: error: 'mdp5_runtime_suspend' defined but not used [-Werror=unused-function] static int mdp5_runtime_suspend(struct device *dev) ^~~~ This marks both functions as __maybe_unused so the compiler can drop them silently. Thanks for the fix. Since the commit is still in Rob's -next branch, I'll post a new version which fixes this. Archit Fixes: d68fe15b1878 ("drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c index 9f9d95f7c80f..f7c0698fec40 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c @@ -1012,7 +1012,7 @@ static int mdp5_dev_remove(struct platform_device *pdev) return 0; } -static int mdp5_runtime_suspend(struct device *dev) +static __maybe_unused int mdp5_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); @@ -1022,7 +1022,7 @@ static int mdp5_runtime_suspend(struct device *dev) return mdp5_disable(mdp5_kms); } -static int mdp5_runtime_resume(struct device *dev) +static __maybe_unused int mdp5_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno