From patchwork Tue Oct 22 09:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sharma, Shashank" X-Patchwork-Id: 11204107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EFBE913 for ; Tue, 22 Oct 2019 10:01:21 +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 0693D2064B for ; Tue, 22 Oct 2019 10:01:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0693D2064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com 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 C8D426E50E; Tue, 22 Oct 2019 10:01:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 855D16E50B; Tue, 22 Oct 2019 10:01:16 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 03:01:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="196388699" Received: from sharmash-desk1.iind.intel.com ([10.99.66.206]) by fmsmga008.fm.intel.com with ESMTP; 22 Oct 2019 03:01:14 -0700 From: Shashank Sharma To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 22 Oct 2019 15:29:43 +0530 Message-Id: <20191022095946.29354-1-shashank.sharma@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATCH 0/3] Add scaling filters in DRM layer X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Blurry outputs during upscaling the video buffer, is a generic problem of graphics industry. One of the major reason behind this blurriness is the interpolation of pixel values used by most of the upscaling hardwares. Nearest-neighbor is a scaling mode, which works by filling in the missing color values in the upscaled image with that of the coordinate-mapped nearest source pixel value. Nearest-neighbor can produce (almost) non-blurry scaling outputs when the scaling ratio is complete integer. For example: - input buffer resolution: 1280x720(HD) - output buffer resolution: 3840x2160(UHD/4K) - scaling ratio (h) = 3840/1280 = 3 - scaling ratio (v) = 2160/720 = 3 In such scenarios, we should try to pick Nearest-neighbor as scaling method when possible. Many gaming communities have been asking for integer-mode scaling support, some links and background: https://software.intel.com/en-us/articles/integer-scaling-support-on-intel-graphics http://tanalin.com/en/articles/lossless-scaling/ https://community.amd.com/thread/209107 https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/1002/feature-request-nonblurry-upscaling-at-integer-rat/ This patch series adds support for programmable scaling filters, which can help a user to pick and enables NN scaling on Intel display hardware (ICL onwards). There is also one option to pick NN only when the scaling ratios are integer, to achieve Integer scaling, without(alsmost) any side effets. there was an RFC series published for the same, which can be seen here: https://patchwork.freedesktop.org/series/66175/ Shashank Sharma (3): drm: Introduce scaling filter mode property drm/i915: Add support for scaling filters drm/i915: Handle nearest-neighbor scaling filter drivers/gpu/drm/drm_atomic_uapi.c | 4 + drivers/gpu/drm/i915/display/intel_display.c | 161 +++++++++++++++++- .../drm/i915/display/intel_display_types.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 31 ++++ include/drm/drm_crtc.h | 26 +++ include/drm/drm_mode_config.h | 6 + 6 files changed, 230 insertions(+), 1 deletion(-)