Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3834723pxb; Tue, 10 Nov 2020 00:53:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKnaTyoEHgyikk6u0aj7epDstLpDXj26iBTDXPqidb/iPTLmYSwvNjjNKqTuwaeDDQ022U X-Received: by 2002:a17:906:803:: with SMTP id e3mr9807756ejd.386.1604998390301; Tue, 10 Nov 2020 00:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604998390; cv=none; d=google.com; s=arc-20160816; b=PKU2/zXvBFQg+4UeM3h+/8aKmGD+uVRUB70qb33q1Poo6Eskf6eFCu6PfthwRH8IGO 0Od3eOiAdMG+h+VFUPxjjFo4dzGjEh0s9TC3xtqdF72hrBbzXl0nNlE5iUXDL/8z27Jt zJbPQjkejjcB1SZ0RU/7xquri2jlB9fJJixYZ/p/DMHlqbTgwCGZJg7NnUsTlqbY6NMq mMcoPo7PFlGw/O7QYJ4Xped9XzzgIfvPRK7/B1RTb9g6M0mzSzGqcv9HCySsvsEayBcM cKRar10OjDLAu1lgoq194AltXoFtL/1q0ofaeUL7soTVIacbARw76kBxjVIcr8LmAzvX c03A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=6zqq+2FPlZDjz1SYQFCkdf1DttCevx1npgTfhwCDvGs=; b=prbO9biQl3Ld+yDj6zts+RohwkR2qootg7kjtoVpEUR61l+PndnuoFHE3IYuvCgaXK Soq6xcFQHRiDqSzgx0o8Kysz0zlNsXCpfyBf858uXghm0l7Aj21lQjgIlhKVmLNeWzhG GuAz0CM8sRMtuH6hAnnriycI91vvRyVAY/cm4UAYz0NSZ2kGRgUC2QtnfJQTxlrCOuKz fH/Rp3/R2qglMmzTuE4zpCzPZMVhQESf2QCfmwdwJRjNmyNhHdPLOj7spGQ4utU0yX6R SEbKj3FEuRf/HYMNm7HWK1qIEBV+dpNO/RL1rCEhuckDeXl66gMS//gEkuuFTmQEBRtn LPQQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si7794044edu.542.2020.11.10.00.52.48; Tue, 10 Nov 2020 00:53:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728119AbgKJIug convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 Nov 2020 03:50:36 -0500 Received: from aposti.net ([89.234.176.197]:34636 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgKJIug (ORCPT ); Tue, 10 Nov 2020 03:50:36 -0500 Date: Tue, 10 Nov 2020 08:50:22 +0000 From: Paul Cercueil Subject: Re: [PATCH] drm/ingenic: ipu: Search for scaling coefs up to 102% =?UTF-8?Q?of=0D=0A?= the screen To: Sam Ravnborg Cc: David Airlie , Daniel Vetter , od@zcrc.me, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Message-Id: In-Reply-To: <20201107193311.GB1039949@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; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cheers, -Paul