Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1733898imm; Fri, 6 Jul 2018 05:40:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfxnuA3k3uYWQeD9a8eCgfeQlI8Y+kU6dPWu/3J9UMxOhRzg09SkHczI5LncKr/PcfGcQjh X-Received: by 2002:a63:4106:: with SMTP id o6-v6mr9474979pga.453.1530880813874; Fri, 06 Jul 2018 05:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530880813; cv=none; d=google.com; s=arc-20160816; b=0pKe8djYp3sFzS1C6oIRyBIByqvMu4TSj5MQyZlk7LTORmARoUALinWvjvFg8hLeN7 OWlS4m4XSfrzIOgRn0VlhTBwr7KBPV0N7GZvI0LRNN8NAHinGxPmu9Gkv4MLl5dF3suf XzPejFactMl9wEJ0DAKWhYz6wXDMh2zVAHdVHdq4Z9+mYNatQPwnPIxR/0aqyLkGTeYG ZAJ6rx9xyi5OQhKVLXG54kJk1yEamP3pfevUzyPvAyuMysa4WQFx0YycoYImNXr3xNID +SP28qpKLNxuW+0t6fTymmzePIZPYMafgKJRJFlON1OG3bV8931V3ZqkwXUFL1swfPNN rAHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=y4JuQRz8Ws+OyJmapOv4hDMCw14z8e4ZC3bx45t9zw4=; b=ld+bzxk92pYclijxkoh8R4vT2HfAVqxgwv7luvc+32jdglPC99hdusVGtc6qEBGzyg 2qDSzMUXdAWccRhKpyfW1AeCmN47954rB312Xesv2KowGPqpKfsGrwrXBYLSAZ1Wb1lQ jkHKLM8X80FqWGG28rDECvqYF6xEuF+ngPqlPmKPDQVbg1COCACPCWvGb6VzKnEeynAb BBfUUlTlAtCcjjGKlSz+dmQU+ZFEp0yPpnC9NviuoiyEbAUYvibPzwn6E7Yz7S1hbXmX 8FmtCDp19sSqhn/pPZP8l5MDHSt69nhCQNkHC33p9qMZrm7+nGQ43qmDKoQE4tVC7PqB mGmQ== ARC-Authentication-Results: i=1; mx.google.com; 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 j6-v6si8020641pgn.416.2018.07.06.05.39.59; Fri, 06 Jul 2018 05:40:13 -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; 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 S933300AbeGFMiu (ORCPT + 99 others); Fri, 6 Jul 2018 08:38:50 -0400 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]:56668 "EHLO alexa-out-blr.qualcomm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933192AbeGFMiq (ORCPT ); Fri, 6 Jul 2018 08:38:46 -0400 X-Greylist: delayed 437 seconds by postgrey-1.27 at vger.kernel.org; Fri, 06 Jul 2018 08:38:37 EDT X-IronPort-AV: E=Sophos;i="5.51,316,1526322600"; d="scan'208";a="98710" Received: from ironmsg03-blr.qualcomm.com ([10.86.208.132]) by alexa-out-blr.qualcomm.com with ESMTP/TLS/AES256-SHA; 06 Jul 2018 18:00:55 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,8945"; a="470262" Received: from asutoshd-linux.qualcomm.com ([10.206.24.163]) by ironmsg03-blr.qualcomm.com with ESMTP; 06 Jul 2018 18:00:54 +0530 Received: by asutoshd-linux.qualcomm.com (Postfix, from userid 92687) id BDA922FAF; Fri, 6 Jul 2018 18:00:53 +0530 (IST) From: Asutosh Das To: subhashj@codeaurora.org, cang@codeaurora.org, vivek.gautam@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Asutosh Das , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 9/9] scsi: ufs: enable FASTAUTO mode during low load condition Date: Fri, 6 Jul 2018 18:00:36 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subhash Jadavani We are currently running UFS link in HS-G3 FAST mode during high load condition for best possible performance and in HS-G2 FAST mode during low load condition to save power. As we are anyway scaling down from HS-G3 to HS-G2, we can also change the mode from FAST to FASTAUTO. So we looked at the performance numbers with HS-G2 FASTAUTO mode and they are good enough for most of the low bandwidth usecases. But Samsung UFS memory devices are exception which has really low sequential read throughput in FAST AUTO mode hence we will only be enabling FAST AUTO mode for other UFS device vendors. Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 50588cf..a6e43f9 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1088,6 +1088,10 @@ static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up) /* scale down gear */ new_pwr_info.gear_tx = UFS_MIN_GEAR_TO_SCALE_DOWN; new_pwr_info.gear_rx = UFS_MIN_GEAR_TO_SCALE_DOWN; + if (!(hba->dev_quirks & UFS_DEVICE_NO_FASTAUTO)) { + new_pwr_info.pwr_tx = FASTAUTO_MODE; + new_pwr_info.pwr_rx = FASTAUTO_MODE; + } } } -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.