Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3814562ybi; Mon, 29 Jul 2019 13:09:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxW26P5s5f4mxMjhAGmzORiMk6JrCgA182wzhE+MH1gOvVK/CEz8OOKNOlQxgcLAVsj1BT/ X-Received: by 2002:a63:e70f:: with SMTP id b15mr106193252pgi.152.1564430946199; Mon, 29 Jul 2019 13:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430946; cv=none; d=google.com; s=arc-20160816; b=zEZS6D5KSeD7Hk0UGV8SdPulr5z89sd7TFRnzZvvFaR4yEXY5+1afXfT2cUfuJwaBp KL5A1nr09fpt8MxfIGmkcrW5r5SoFMQkR0j/3VgSafZxrvd68v2V/bdE2ppHCub7zXTD mgPa37k3palld1ETZ3SmtbiP/HHqCK0Ah0RjorcJShCt+DNol55CohKBT+FRtMs2u3Gr 5KV/j8x7wJnyNtVlo5MCq7Xc7WXt+fEZ7gGtNB5QGINruUwRpvaIpFwxpbpeFEaM5IB7 B9ozw8eaTGIiFgnpk3Hq31lfeKRgA3ZQjPQgOEjnV1PVwVsXnAD6X/bA0Mv8Vx2wV5i6 nTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D87j8dTYT6fXENBUrgWQBYEVvZP+dDSUuip1U1AsCtg=; b=bS5+aGoZ6OWX4SkAcM301LbdZr6QSLduT8qQ5vCvp681ec67f1L6faSbynOwDzVToj uMn4wEy+2GIxelDAhmdZWf9AoPFDd3YclkRK6SkYQ6ABee71+H6+XC+bYMTLjJof6w85 heo4yEDdKY0EYjQ6En44JThDpBQ2U9NSAs/RWNTap9oGRrfWWPaOPNVd62d0H5tDZ52H jT7BedVUEDDvmy+ITZ5kaYa9mDnRqiW7sVLjgTVkwoLxoIcUJe3HmnHG5sJn8FwWIdr5 L87IOM4HeL5NsuUf6Nfvv5LGi/liCSWLNhrcCmlb502thkSSl4T6khUPMriAfD6OtxOB n3dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IckrkHvA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o75si27425547pje.87.2019.07.29.13.08.50; Mon, 29 Jul 2019 13:09:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IckrkHvA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389008AbfG2Tj1 (ORCPT + 99 others); Mon, 29 Jul 2019 15:39:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:54524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388638AbfG2TjX (ORCPT ); Mon, 29 Jul 2019 15:39:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D2E7820C01; Mon, 29 Jul 2019 19:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429163; bh=iOEROdCnpiC/RJj4ZK4tu8PJjLIQIf1mL34rnqhYWcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IckrkHvAJ6QBs54IY1S97YigR7FXN5CbqCdiYudwFC8xQ8rYGcTNxeGHZwB/SP4Sd XNs6iA3cN9eCPGHKjLELp42L2Hm5RPr++30AXX9TfLWFHmmcVPTxRNJD2XSDwWxfLy oG6V2ASo11mQsYLWJZArUvmajXVoR2rZomRBZbTI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Hsieh , Anthony Koo , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 012/113] drm/amd/display: Disable ABM before destroy ABM struct Date: Mon, 29 Jul 2019 21:21:39 +0200 Message-Id: <20190729190658.718717454@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190655.455345569@linuxfoundation.org> References: <20190729190655.455345569@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 1090d58d4815b1fcd95a80987391006c86398b4c ] [Why] When disable driver, OS will set backlight optimization then do stop device. But this flag will cause driver to enable ABM when driver disabled. [How] Send ABM disable command before destroy ABM construct Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c index 29294db1a96b..070ab56a8aca 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c @@ -474,6 +474,8 @@ void dce_abm_destroy(struct abm **abm) { struct dce_abm *abm_dce = TO_DCE_ABM(*abm); + abm_dce->base.funcs->set_abm_immediate_disable(*abm); + kfree(abm_dce); *abm = NULL; } -- 2.20.1