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=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT 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 6A235C7112F for ; Mon, 21 Jan 2019 12:19:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FBF02084A for ; Mon, 21 Jan 2019 12:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="DhZxc8AL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="itAxlVxn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728234AbfAUMTi (ORCPT ); Mon, 21 Jan 2019 07:19:38 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:49855 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbfAUMTi (ORCPT ); Mon, 21 Jan 2019 07:19:38 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 3EF2F15010; Mon, 21 Jan 2019 07:19:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 21 Jan 2019 07:19:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=TKrTHvL0RJppoAqvt2QcJPHh3XP sYYrREF2Z92a9OlY=; b=DhZxc8ALzg1FPW5Wkawb6P5MOw1uRzqU669B75fT2SQ 6mAmcYwUzGXtFcX8eK9zodY2Nwsp6dJJLlotNfR17KW+nJEW4SuqVN1goLu0aHq6 VeBidvt5BvxNFw7zb5m96toY3ZnZMs0+yx785g7vEG0vWqUhJ502nndJBtOzzQc3 Irbm02oghi/Vh6jJsmHCM/4vArra2/35pN9PlSrT9iRyGw1rQPcKxKU9BcBX0BMc Co/iMz3woWMmEc/96mQhk4wabe3LioAZ22nc2mfx1wERH9rSfcs7iZeLuHMZarcD fYOuNINdGzbgrl7g4lDtFLI17cYisoKUHyd+2OGQ5zg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=TKrTHv L0RJppoAqvt2QcJPHh3XPsYYrREF2Z92a9OlY=; b=itAxlVxnl4R2FStRKg6QQX 9/bUUd7vxU8SDX3pBekIYI76IWldId6AG8n26Qa18UxQCxYBFzvBekmYNalq7Ul8 Rj9SkZCqWJLJ1rdpr5qCUaf23GoeXhcsmIx86TAI1feLM6DoaEw9A6gkD73C36kK gva+BfzQ0hvPBlesgiCH2utyg7kOHtCzGH0WOgCEoz2x5lQYEY00INofOODGdhjy jKjoCuoxyqUQUGpNG8CEnBltg1Gmdmy8CK3RkrDKw5WczyuDy68un42MdAObYmSn x+VNk0rAE9iRvZpNiAqb0KmZS0XqVWuKr2Srh/k6RoqrqR75tPErHfCzFe7vFTJQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhprghmkfhpucdlfedttd dmnecujfgurhepfffhvffukfhfgggtuggjfgesthdtredttdervdenucfhrhhomhepifhr vghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuffhomhgrihhnpehfrhgvvg guvghskhhtohhprdhorhhgpdhsohhurhgtvghfohhrghgvrdhnvghtnecukfhppeekfedr keeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 49D1110087; Mon, 21 Jan 2019 07:19:36 -0500 (EST) Date: Mon, 21 Jan 2019 13:19:35 +0100 From: Greg KH To: Ivan Mironov Cc: stable@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH] drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock Message-ID: <20190121121935.GA15873@kroah.com> References: <20190117030234.23204-1-mironov.ivan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190117030234.23204-1-mironov.ivan@gmail.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Jan 17, 2019 at 08:02:33AM +0500, Ivan Mironov wrote: > commit 66a8d5bfb518f9f12d47e1d2dce1732279f9451e upstream. > > Backported by adjusting patch context. > > Strict requirement of pixclock to be zero breaks support of SDL 1.2 > which contains hardcoded table of supported video modes with non-zero > pixclock values[1]. > > To better understand which pixclock values are considered valid and how > driver should handle these values, I briefly examined few existing fbdev > drivers and documentation in Documentation/fb/. And it looks like there > are no strict rules on that and actual behaviour varies: > > * some drivers treat (pixclock == 0) as "use defaults" (uvesafb.c); > * some treat (pixclock == 0) as invalid value which leads to > -EINVAL (clps711x-fb.c); > * some pass converted pixclock value to hardware (uvesafb.c); > * some are trying to find nearest value from predefined table > (vga16fb.c, video_gx.c). > > Given this, I believe that it should be safe to just ignore this value if > changing is not supported. It seems that any portable fbdev application > which was not written only for one specific device working under one > specific kernel version should not rely on any particular behaviour of > pixclock anyway. > > However, while enabling SDL1 applications to work out of the box when > there is no /etc/fb.modes with valid settings, this change affects the > video mode choosing logic in SDL. Depending on current screen > resolution, contents of /etc/fb.modes and resolution requested by > application, this may lead to user-visible difference (not always): > image will be displayed in a right way, but it will be aligned to the > left instead of center. There is no "right behaviour" here as well, as > emulated fbdev, opposing to old fbdev drivers, simply ignores any > requsts of video mode changes with resolutions smaller than current. > > The easiest way to reproduce this problem is to install sdl-sopwith[2], > remove /etc/fb.modes file if it exists, and then try to run sopwith > from console without X. At least in Fedora 29, sopwith may be simply > installed from standard repositories. > > [1] SDL 1.2.15 source code, src/video/fbcon/SDL_fbvideo.c, vesa_timings > [2] http://sdl-sopwith.sourceforge.net/ > > Signed-off-by: Ivan Mironov > Cc: stable@vger.kernel.org # 4.14.x > Cc: stable@vger.kernel.org # 4.19.x > Cc: stable@vger.kernel.org # 4.20.x > Fixes: 79e539453b34e ("DRM: i915: add mode setting support") > Fixes: 771fe6b912fca ("drm/radeon: introduce kernel modesetting for radeon hardware") > Fixes: 785b93ef8c309 ("drm/kms: move driver specific fb common code to helper functions (v2)") > Signed-off-by: Daniel Vetter > Link: https://patchwork.freedesktop.org/patch/msgid/20190108072353.28078-3-mironov.ivan@gmail.com > --- > drivers/gpu/drm/drm_fb_helper.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) All now queued up, thanks. greg k-h