From patchwork Wed Jun 1 20:53:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9148117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE2A760761 for ; Wed, 1 Jun 2016 20:53:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2785200F4 for ; Wed, 1 Jun 2016 20:53:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7838268AE; Wed, 1 Jun 2016 20:53:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 801F0200F4 for ; Wed, 1 Jun 2016 20:53:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43F836EA46; Wed, 1 Jun 2016 20:53:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B46F6E25E for ; Wed, 1 Jun 2016 20:53:34 +0000 (UTC) Received: by mail-io0-x241.google.com with SMTP id p194so4095455iod.0 for ; Wed, 01 Jun 2016 13:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y40WDCdlxzYQgV6MuSkO9/C/4CU1p5YGQXC4C9DWpEQ=; b=RAGG6mWiLEDo75v3a40IY76Uk7Z+A3a4+rNC13Kp+UgbESkUs3y4bGqKyVb1x+EZUt 8jvyJVsSHkb3PO7JUKfGSiydJqaO07GLn1r6ya0/0MXEay8ZatQeMsTtx7Tl9x+ILYmh aI0xXyqXam+SnBy9Teo4DqyEEDQRhBBLmOFK7gCLQEAcQXLa3gHXPlt7tW4tqA/Aa5iy vIqpr4vFExbfOrleBjiu/0czGGXr2HStGFGFWDWhQOL/r07cJyRDqXo7c+TeDjPAe2MP 2VECZb/6k3Ief0wmYFNAokYrhLNON3mpsOXCeXdJXse4jbTm6lyugbVWejSAreSisJHy wFsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y40WDCdlxzYQgV6MuSkO9/C/4CU1p5YGQXC4C9DWpEQ=; b=D/zqegxejSlGuhVSTvbeefoirc0SeKzi7X8aWt1zc9WIS43nMEvzC6+BEsUBovGEe0 RMX/1fH8bmMs6BrK9hORY/UC9CWbnB2EwY6trVh1FqpBetrDm657+X0YTnSWm4hepV9j H5TKWo1VsUp4/vNBG+X10yP0YulRxley2G6UIvd14qCkgNKNX4Er93nO6YWww2d9AF+e UucbHTwtCLIPPDURFGO4T7QlvlyY/fY+oAVrxrQGvNXkz2/F9a/wq+yXGOgn4Pmn4L5K m7yow2ttuuTOi5Sda5MCwAYvfPF7caLbAmYnm6YhaAcOYvwN5HTjNRsc39YM704ywBT8 /LYg== X-Gm-Message-State: ALyK8tJYp6LubnEWGlu7/rDySCnPAeIBJToP13CaHyhh7ulsoa8kBr5F4dAdDMBg80Et2Q== X-Received: by 10.107.26.85 with SMTP id a82mr6905762ioa.13.1464814413407; Wed, 01 Jun 2016 13:53:33 -0700 (PDT) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id x83sm12983532itf.2.2016.06.01.13.53.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2016 13:53:32 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 01/12] drm/amdgpu: disable power control on hybrid laptops Date: Wed, 1 Jun 2016 16:53:14 -0400 Message-Id: <1464814405-19729-2-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464814405-19729-1-git-send-email-alexander.deucher@amd.com> References: <1464814405-19729-1-git-send-email-alexander.deucher@amd.com> Cc: Alex Deucher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Windows 10 (and some 8.1) systems use standardized ACPI calls for hybrid laptops to control dGPU power. Detect those cases and disable the AMD specific ATPX power control. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 35a1248..3af1c3a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c @@ -183,6 +183,11 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx) ATPX_DFP_SIGNAL_MUXED)) atpx->functions.disp_mux_cntl = true; + if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) { + printk("Hybrid Graphics, ATPX dGPU power cntl disabled\n"); + atpx->functions.power_cntl = false; + } + kfree(info); } return 0;