From patchwork Mon Dec 14 22:20:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aurabindo Pillai X-Patchwork-Id: 11973249 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.5 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 9D4C4C4361B for ; Mon, 14 Dec 2020 22:21:47 +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 5CBC122507 for ; Mon, 14 Dec 2020 22:21:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CBC122507 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 635436E14F; Mon, 14 Dec 2020 22:21:46 +0000 (UTC) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2069.outbound.protection.outlook.com [40.107.237.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B78189F5F; Mon, 14 Dec 2020 22:21:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oYmUsdNAKcSzBPF/ewqkSehi5eA18NsfyIe3DmA5eBAPqqL8NsJTeqpOlAZH84cpf0cYBybrIsq3Xh65av0f4muPvYzUJgTpXKLZgup3sNcSfva2mgPeBM7IzFEr7Up2NJ74Nay0ELeesdrE+lUhdoQnEz2+jQLxUlwtRVLCDzuLaWNsqfLvBoPPv3RVbLRuW2Xt4Eu8ymyiRupcfILfTrOeym8zPHp2kNhDllhYg2lOc/shykXFtQmLV8Nd4AoUWfTxgqKPkL+tBBUL4U+UAz6kq+HTBnDaqr6DGLXjb1Kq23CTTSrjMY8aCX+ewva5RzdAHAoY7GhLUwcdXqP5aw== 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=hXKdamgwWZQAjnoxAND/7RVY0TRlaKBfZ84+R36FxIg=; b=DRYbcCE0RMbK8TSGQIpjz8jZaIZtBkO2Lu4bSx1LYqC6v4MCy9IVh+/BdRBu33VRONaDvd9N37pao6SFfgTpgsFlsvp7s8YrQxoWPwrCKokJ532bhTutlrj8ZOfvZzQGY3mrLzFUt5Hc5n9n4WqiHGEG+raqgp922lV9noY554aI1EURckAFiE6XspzwbMx/kqjFEIlTikvLrlVpd3p0HZzPNJmbhBZQ2TCEdJRFo3Dz0O1z9v/gPIi1+3P6LWqfcK1xpA43nJUbUhGGm1LEwqaa53UC4TVuIuSZKfq02ziNi6xCB5ugXmvMIgTZG/MOg3uDGqUCqwTW3sTKTSLjJw== 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=hXKdamgwWZQAjnoxAND/7RVY0TRlaKBfZ84+R36FxIg=; b=mtnPdh7q12tHEUMq5/Eiaf5DRNBn6h1xKl2EPcJMZPhLuLQlrFfdQEiCYZiQjeWZxkjgaf8oaFSUk0ZkqbKmclP1K7j2hQOGOpGakTPPBwtHnOUgtDzSNc2u28RFsgUR0m4It7l9Qk1KXnY1YobJTbVl7AeotrkZbSmmFNq2iLs= Received: from DM5PR12CA0072.namprd12.prod.outlook.com (2603:10b6:3:103::34) by CH2PR12MB4104.namprd12.prod.outlook.com (2603:10b6:610:a4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Mon, 14 Dec 2020 22:21:42 +0000 Received: from DM6NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:3:103:cafe::13) by DM5PR12CA0072.outlook.office365.com (2603:10b6:3:103::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Mon, 14 Dec 2020 22:21:42 +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 SATLEXMB01.amd.com (165.204.84.17) by DM6NAM11FT028.mail.protection.outlook.com (10.13.173.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3654.20 via Frontend Transport; Mon, 14 Dec 2020 22:21:40 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 14 Dec 2020 16:21:26 -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, 14 Dec 2020 16:21:25 -0600 From: Aurabindo Pillai To: , Subject: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode Date: Mon, 14 Dec 2020 17:20:34 -0500 Message-ID: <20201214222036.561352-2-aurabindo.pillai@amd.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214222036.561352-1-aurabindo.pillai@amd.com> References: <20201214222036.561352-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: 2bc740d2-86f1-4c62-e60d-08d8a07ea16b X-MS-TrafficTypeDiagnostic: CH2PR12MB4104: 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: ibK1VGZjJ3hrILZlrC49yG6AYV62x9+A42aSPtaslGIVsvJkopJMIFr00b3OqvbALPmOZlu0uhRGzl4O+toX7w6xdgMyZwO1MBvANsIK8vIO5Kdq+yVAYNYLSO6ZFaUsvYOc2GdBY3AUzXgO8TTNDRrxeosPG85RZE9fDJBVm0q2VQrNlDUxUBrgzfwNPinFEUcWcKGCUEJKpttQTvQYXwc2vnHzC4R6xpHTkRnUiMgnCqHNstTNJDzh9HwUzvFhR3vUHqKb8I4P8dcKAlki0HnHat0L1A63hwFhtPkmXMe/VRD8ZMIlLqswSLv5uBoqDeDC71NJJtnSoXRgY7WiTY0Z1uvBMhm+pYZakUL5l5loW5XCnC362pAazRF2VEEuH34dnr/Kx9LL6FGASvyiqg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB01.amd.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(376002)(346002)(136003)(46966005)(36756003)(426003)(186003)(70206006)(26005)(450100002)(336012)(4326008)(44832011)(2616005)(8676002)(2906002)(6666004)(356005)(47076004)(1076003)(81166007)(5660300002)(83380400001)(8936002)(70586007)(508600001)(7696005)(82310400003)(86362001)(54906003)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2020 22:21:40.6572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2bc740d2-86f1-4c62-e60d-08d8a07ea16b 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=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4104 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: alexander.deucher@amd.com, aurabindo.pillai@amd.com, nicholas.kazlauskas@amd.com, shashank.sharma@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 eed5410947e9..e0942184efdd 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 b2a1dd7581bf..ece51ecd53d1 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( + experimental_freesync_video, + "Enable freesync modesetting optimization feature (0 = off (default), 1 = on)"); +module_param_named(experimental_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)