From patchwork Mon Jan 4 21:07:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aurabindo Pillai X-Patchwork-Id: 11997587 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 72C31C433E0 for ; Mon, 4 Jan 2021 21:08:25 +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 2A68E20776 for ; Mon, 4 Jan 2021 21:08:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A68E20776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7471D6E055; Mon, 4 Jan 2021 21:08:24 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D8A96E055; Mon, 4 Jan 2021 21:08:23 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OHD6w2NjsO8+fxtU24S0m1tf0y/3gUFTjLAe0WXpEi4Yr/60II24hR0SWD6Vn4+V876Jo58yKROG8s+k9Zt0ua9LlVJ3+F9Dvj+07indAmylcvQdFXMUgshZgSdNOPK2s7YI1Lm/8ODOxPB3R/T9fmnuCJG8DcRnor17ahFS5bExhhyOpGbmmmLHyA60KizhEEpSVCZnwr97cUfY7yZVqRMGYxsoozcm+MxfPO1t5SNvlCiNHliW3Duqg9Ch2Jsiksd1WePZVvS645KuqQe36AMJR7H3rbPpuEw/NyGrhKxTifv7z4xMYoMjTzQLmXU6/0+xv58XYmQ0TDzDee85VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mkRPBDSGtsZySrTqYlWjwUfn0dhd9qnPcdjJMU6LNBY=; b=mstzfVR+nqrGAesB5VINljae0toPN7ZDc6OI7VWYc+aVMBZYEX+hYCpG8DJvxk1pVshq5s5Z52ViKzgIbdte09z02OuATlQA3ax/rvuWpAnVXcWRtsCrc7Xfopa5CSYCJQslsOoz5MOannnza2pbbeMyL04RNeTzAbnkiwOatuUkatLX3rhdQ/Z02SMFWYI9+GH0m97WkSZpn8KEXxiIMnazW8LD+laKewmcnkwpflzcyop1v/3QxXSh001KigTXX+ihzrFPSUTforgiomkfBals/AtPXo0leNwM9EoFsLMnuuhxz4eYKDSJKlp+w2UGlfaoP4DbyVcf8nekhLl1gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mkRPBDSGtsZySrTqYlWjwUfn0dhd9qnPcdjJMU6LNBY=; b=d2O3azC73i/rwHH+cKcqFET2RLQ/MYx40b19slOXZIr8MQaN687AqQ/W9ZcVs296o62shcqkZ5cSq4M/FEItBp7tD4Li7rwOkIbIPD4t0NYtzlCOhA2qFVpKj61+Xl5iGNUQmwS7B3aH/WmTIoKiHuTmJZL2P8I0IC1EQpQ9WA0= Received: from DM3PR12CA0043.namprd12.prod.outlook.com (2603:10b6:0:56::11) by MN2PR12MB4453.namprd12.prod.outlook.com (2603:10b6:208:260::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.24; Mon, 4 Jan 2021 21:08:22 +0000 Received: from DM6NAM11FT040.eop-nam11.prod.protection.outlook.com (2603:10b6:0:56:cafe::e7) by DM3PR12CA0043.outlook.office365.com (2603:10b6:0:56::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19 via Frontend Transport; Mon, 4 Jan 2021 21:08:21 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=fail action=none header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 165.204.84.17 as permitted sender) Received: from SATLEXMB02.amd.com (165.204.84.17) by DM6NAM11FT040.mail.protection.outlook.com (10.13.173.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3721.23 via Frontend Transport; Mon, 4 Jan 2021 21:08:20 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 4 Jan 2021 15:08:19 -0600 Received: from elite-desk-aura.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 15:08:18 -0600 From: Aurabindo Pillai To: , , Subject: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode Date: Mon, 4 Jan 2021 16:07:58 -0500 Message-ID: <20210104210800.789944-2-aurabindo.pillai@amd.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104210800.789944-1-aurabindo.pillai@amd.com> References: <20210104210800.789944-1-aurabindo.pillai@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb9cdaf9-21e3-4492-5de6-08d8b0f4dd40 X-MS-TrafficTypeDiagnostic: MN2PR12MB4453: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XKZE6F4p73rI6YELZnL5s1B4yyz0x65W7YwSrmrrcmPIQ5B8hvbUuzDYg2faYICWEQS9Tu4CJVrf/7SL6CcEdmHJLALdvhHdIJ3Th1sAkqd/Yq07gLR0JFHL1NSIKvI5+ZSmT2AWn9EePTs3T13T1eS4ojyT+2VvtqTu06bIzWFMkHLEYdgNVkx4JB6boMN/p/Lyuj4YuPL0/Zl9IFXR2NTIen9g6danmmO2cCJ528qZw8at7tT9D9UzOj5nm0eEMk6jLrvhY5VCZrJIJ91ujKnZOPV/21QN5NzvX/iwRJMuNX4fgfd7KZjYrDbCrjv9AAq7j8y/MwRhMlHQQ53H2YOsvdoT3QZQQ3/KQ+CrkZhwlv/2cUd8l6JUHenM3nWEB1mK50qaVAX/mhifek4UT96HLwebvJFiCtSq42hSGLQ+ByxFHmcZ2dYu6d4qekoYGRWeIJ0np20PgXMAI+LDVA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB02.amd.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(396003)(136003)(46966006)(110136005)(8676002)(54906003)(6666004)(4326008)(44832011)(316002)(450100002)(70206006)(70586007)(7696005)(478600001)(5660300002)(2906002)(1076003)(26005)(36756003)(86362001)(2616005)(426003)(186003)(83380400001)(8936002)(47076005)(356005)(336012)(81166007)(6636002)(82740400003)(82310400003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2021 21:08:20.2477 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb9cdaf9-21e3-4492-5de6-08d8b0f4dd40 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT040.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4453 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stylon.wang@amd.com, thong.thai@amd.com, shashank.sharma@amd.com, aurabindo.pillai@amd.com, wayne.lin@amd.com, alexander.deucher@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" [Why&How] Adds a module parameter to enable experimental freesync video mode modeset optimization. Enabling this mode allows the driver to skip a full modeset when freesync compatible modes are requested by the userspace. This paramters also adds some standard modes based on the connected monitor's VRR range. Signed-off-by: Aurabindo Pillai Acked-by: Christian König Reviewed-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 100a431f0792..12b13a90eddf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -177,6 +177,7 @@ extern int amdgpu_gpu_recovery; extern int amdgpu_emu_mode; extern uint amdgpu_smu_memory_pool_size; extern uint amdgpu_dc_feature_mask; +extern uint amdgpu_exp_freesync_vid_mode; extern uint amdgpu_dc_debug_mask; extern uint amdgpu_dm_abm_level; extern struct amdgpu_mgpu_info mgpu_info; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index b48d7a3c2a11..2badbc8b2294 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -158,6 +158,7 @@ int amdgpu_mes; int amdgpu_noretry = -1; int amdgpu_force_asic_type = -1; int amdgpu_tmz; +uint amdgpu_exp_freesync_vid_mode; int amdgpu_reset_method = -1; /* auto */ int amdgpu_num_kcq = -1; @@ -786,6 +787,17 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444); MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)"); module_param_named(tmz, amdgpu_tmz, int, 0444); +/** + * DOC: experimental_freesync_video (uint) + * Enabled the optimization to adjust front porch timing to achieve seamless mode change experience + * when setting a freesync supported mode for which full modeset is not needed. + * The default value: 0 (off). + */ +MODULE_PARM_DESC( + freesync_video, + "Enable freesync modesetting optimization feature (0 = off (default), 1 = on)"); +module_param_named(freesync_video, amdgpu_exp_freesync_vid_mode, uint, 0444); + /** * DOC: reset_method (int) * GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)