Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3838111pxb; Tue, 10 Nov 2020 01:01:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJweV1jC6Ij/aOJBiGzZGiKT0obP29EczGBtjuoHeZXKCCgT0+Al343Q48jt7oUQZvw44urk X-Received: by 2002:a17:906:3fc5:: with SMTP id k5mr19538528ejj.158.1604998862782; Tue, 10 Nov 2020 01:01:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604998862; cv=none; d=google.com; s=arc-20160816; b=GUFXvASXirr1hFRuKTc7yFVjU0h26ttnHCiQbIYzyk+7kN9FGZv66nNmjP3JAPt3Kb HXhgXBZEgyN/N11wJ4F+QAA+hY+gISiqNi3ygM+NgxnHDMoeq8roXiHKBCElaHY17k5/ 6DALBRRMTAwknezIbJLrg9/xgQia9JOTLAcw/+TeDxwUZLUsFLSg+OtaEPg5EZYeaRf5 LhTdAoLGSZx7J4VY7xNMRIGAnbcR+3BBv+gyoUiidvAXw7dJ4g9anF6wt1zKQB+J+MJn AI0McJCnb1A5UV69ADpITGD/kSIItUAMmbOhrZkxmwI7Udf3UvXnDXxGXsVlevoPkNpg Ci5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bPHg/gBnQDbqYs26nPjvBiGd17/kMChc7q4E37rtyO4=; b=eKXUBLdrgjIeN/IUfCYMgxZbWkLqkF9aZtNCWWI5OlmHbcThX+EhIMs/RDFG9x9ZCd SrDUy93cs+IH0oV9Xdf517XfA5xl+CdJWRkGtWDP0+Bx1frlG6Rx79zewdM1FrX/6J9x JgNaEAJ2I+EaveraJIDfkgnxjaXKE0zF/ZL97FRi6oxYMT8txYXKuhckW8WbkrPmQi6P 2mLSRcbd0Yjg7h2xxQvczJqoSzXNNviQH0kJjwKOq5u6q03wYGvX8gansaR5uQCCBdnQ 8lTzlPqLCqtkgJHfN+p6f6TzNkhMWDaLhJVIOsJFuYEuXvaxlnYavUD4gc7MDKpjMgob FGew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si9273954edn.68.2020.11.10.01.00.34; Tue, 10 Nov 2020 01:01:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbgKJI5F (ORCPT + 99 others); Tue, 10 Nov 2020 03:57:05 -0500 Received: from asavdk3.altibox.net ([109.247.116.14]:48830 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgKJI5F (ORCPT ); Tue, 10 Nov 2020 03:57:05 -0500 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 09C9F20038; Tue, 10 Nov 2020 09:56:59 +0100 (CET) Date: Tue, 10 Nov 2020 09:56:58 +0100 From: Sam Ravnborg To: Paul Cercueil Cc: David Airlie , Daniel Vetter , od@zcrc.me, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/ingenic: ipu: Search for scaling coefs up to 102% of?? the screen Message-ID: <20201110085658.GA2027451@ravnborg.org> References: <20201105083905.8780-1-paul@crapouillou.net> <20201107193311.GB1039949@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VbvZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=8nJEP1OIZ-IA:10 a=7gkXJVJtAAAA:8 a=ER_8r6IbAAAA:8 a=9CIfjzEbJXW8LZeqSngA:9 a=wPNLvfGTeEIA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=9LHmKk7ezEChjTCyhBa9:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On Tue, Nov 10, 2020 at 08:50:22AM +0000, Paul Cercueil wrote: > Hi, > > Le sam. 7 nov. 2020 ? 20:33, Sam Ravnborg a ?crit : > > Hi Paul. > > > > On Thu, Nov 05, 2020 at 08:39:05AM +0000, Paul Cercueil wrote: > > > Increase the scaled image's theorical width/height until we find a > > > configuration that has valid scaling coefficients, up to 102% of the > > > screen's resolution. This makes sure that we can scale from almost > > > every resolution possible at the cost of a very small distorsion. > > > The CRTC_W / CRTC_H are not modified. > > > > > > This algorithm was already in place but would not try to go above > > > the > > > screen's resolution, and as a result would only work if the CRTC_W / > > > CRTC_H were smaller than the screen resolution. It will now try > > > until it > > > reaches 102% of the screen's resolution. > > > > > > Signed-off-by: Paul Cercueil > > > > Looks like the patch does what the descriptions says. > > So in other words - look OK to me. I am not confident enogh for a r-b > > but my code reading is enough to warrant an a-b: > > Acked-by: Sam Ravnborg > > Note that this algorithm exists mostly as a band-aid for a missing > functionality: it is not possible for userspace to request the closest mode > that would encapsulate the provided one, because the GEM buffer is created > beforehand. If there was a way to let the kernel tweak the mode, I could > write a better algorithm that would result in a better looking picture. Could you add this nice explanation to the changelog so when we wonder why this was done in some years we can dig up this from git history. Sam