Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp689444pxb; Tue, 2 Feb 2021 15:39:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyskPF9gtYkv4OgsmfIRBS7EW/ssBJDSEDxyPRYqXOifF8Xk+fob6Pu4An2oGwzKmUR524u X-Received: by 2002:a17:906:b047:: with SMTP id bj7mr389924ejb.335.1612309191627; Tue, 02 Feb 2021 15:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612309191; cv=none; d=google.com; s=arc-20160816; b=b+PDMbD6/fuoQespy+NQzDRJoZef9LgPKAtF4GfnaH/bKKXxQl+c2g+6NRlYaIxB2l 7E8I2avRWj/GvTH9jb0p1CSt2g+FpDEWYEWlAYjrEYq/QmIUxWUYciLFkyPxfVgwXNnF T9OHRfuRSodyxPSXVGe6xQ1g83WVJS1ZPBgCUXwzPX8dkL75gHCPOfIllW2aO/V7kGGH q8cOxQuxWn02qTQ9+tNInTfDawYYmT7yP32WeSVkomTTdZoZoTYtrQ1uezMvJoRka4Qn nxk5s+r5XN1uw9WZt5+u+CIJFcQmY+0TdT5K8dnhGDjDwVh4K6U2pX4oHxgkgCceYh+b YClg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nmtKOztRPU1FHLWkkh8andN7amnZAPXC6AXlDwUJfkM=; b=jPmWYjeoQefady1gjOFagHQ1OV4BdViidmbei7wks6ObY3BPhQbKaqNxVfFxkWGkwm NE54utIW/fzVApGiEVoWqUDgFEK1apykTvs4sLyGhQXEgDZ9YeRu25uLKt+l7fJAjlMJ Ljlqn1Nfbxr/yibDp/MCHKGHlpOD8VBxxkIb0p6DRO5fQhjOEZnE8HFQzJCImARj7XyN F1CsqFaPeS+R2zSdIq+x5aX1siAcqCpeNgl0Ktf4SLLEa0ws8Rwkzlyo/yqpkLYYwm9r gV0+3Ou2GE13VQCM5Xr7qLMGQFMt0Aq0qmkOMA2tT78HCEKSuXAlkj8D1joPkmhVIfts oIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xNfXP/GM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si236802ejb.358.2021.02.02.15.39.25; Tue, 02 Feb 2021 15:39:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xNfXP/GM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236162AbhBBROF (ORCPT + 99 others); Tue, 2 Feb 2021 12:14:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235887AbhBBQZ3 (ORCPT ); Tue, 2 Feb 2021 11:25:29 -0500 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA54C0613ED for ; Tue, 2 Feb 2021 08:23:09 -0800 (PST) Received: by mail-oi1-x22c.google.com with SMTP id a77so23339322oii.4 for ; Tue, 02 Feb 2021 08:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nmtKOztRPU1FHLWkkh8andN7amnZAPXC6AXlDwUJfkM=; b=xNfXP/GMRfWtyYmR9X6j3Nh5jpiQWgvYPDyLx6wo9BR1leBdbgF/GRp292X0xCbDLo B8cDJzU8sTUW6RmBsm847N2mLoDOnrdopQyxp1b4Jr7gDGa+jXrvkQxO7rcu6inHKgdL tavjCt2VYeCDmdZL59OfjHZ9FxvBYU7rjqgTHt+M+kAn0EvcsDV1w2wOtQUkpD7Lu5wr mjW/+i2cCdzKU47Ya9YSlwSiVtGWlf1C3AsZSAili3iYsHJrRDhRG4k8I3jaXVG+SqGX +2Tal4E0nSdNaANLcxedEHeXD6p4qCN4crrT8EMJqzkaijuMhmTkN5FRbkzg4muxKKDt achw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nmtKOztRPU1FHLWkkh8andN7amnZAPXC6AXlDwUJfkM=; b=opcsLEdSEpKyb/j7cdDyeCgp6xaGY8iSPnTjif69T6SiwI362CBE1VKkP2YBEZfcIT BKns8JnSPDgfHdochPeDuCJvtT+UakFycwTYWZlf9y1T3qfSxF3rAl2vV58mVu4UhV8F 7W19h4lU50nWCXBSS9A1uB06jDgeylRqvENJPPhwZhYNHq+AkzPRF7cqrS5AOI5FR8IW S9GhT2TMgR/X7T25gvmjRzK/pQElLFxzPst6wuROa1qxm9oM3tqw10lr/EoIKH6nYcPF J9zid9Q9XYx4s4jASPmz1CAyPNAQwW3c0dtfvkK7eACz+use1hmrs9xvVADmWgD8umEH +tjw== X-Gm-Message-State: AOAM532NsgD7Cy38pGwFvV6qrFLEuMcMC5aGFDT15Pvcds7z3+xqMEo2 Px0I3l2u6gPrpCLpZVhybj7dWg== X-Received: by 2002:aca:308a:: with SMTP id w132mr3114257oiw.69.1612282988874; Tue, 02 Feb 2021 08:23:08 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id q3sm4239695oih.35.2021.02.02.08.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 08:23:08 -0800 (PST) Date: Tue, 2 Feb 2021 10:23:06 -0600 From: Bjorn Andersson To: Wesley Cheng Cc: agross@kernel.org, balbi@kernel.org, gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v7 4/5] usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default Message-ID: References: <1611895604-4496-1-git-send-email-wcheng@codeaurora.org> <1611895604-4496-5-git-send-email-wcheng@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1611895604-4496-5-git-send-email-wcheng@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 28 Jan 22:46 CST 2021, Wesley Cheng wrote: > In order to take advantage of the TX fifo resizing logic, manually add > these properties to the DWC3 child node by default. This will allow > the DWC3 gadget to resize the TX fifos for the IN endpoints, which > help with performance. > > Signed-off-by: Wesley Cheng > --- > drivers/usb/dwc3/dwc3-qcom.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index d803ee9..4ea6be3 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -564,6 +564,7 @@ static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count) > > static const struct property_entry dwc3_qcom_acpi_properties[] = { > PROPERTY_ENTRY_STRING("dr_mode", "host"), > + PROPERTY_ENTRY_BOOL("tx-fifo-resize"), I checked the ACPI tables for Lenovo Miix 630, Yoga C630 and Flex 5G and neither one has this property specified. So while we could just add this here, it would have to be done in collaboration with the people who actually define these. And as said before, I believe we want this to always be enabled. > {} > }; > > @@ -634,6 +635,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) > struct dwc3_qcom *qcom = platform_get_drvdata(pdev); > struct device_node *np = pdev->dev.of_node, *dwc3_np; > struct device *dev = &pdev->dev; > + struct property *prop; > int ret; > > dwc3_np = of_get_child_by_name(np, "dwc3"); > @@ -642,6 +644,14 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) > return -ENODEV; > } > > + prop = kzalloc(sizeof(*prop), GFP_KERNEL); > + if (prop) { > + prop->name = "tx-fifo-resize"; > + ret = of_add_property(dwc3_np, prop); Can't we come up with a way where the platform driver enables this on the core driver without modifying DT? Regards, Bjorn > + if (ret < 0) > + dev_info(dev, "unable to add tx-fifo-resize prop\n"); > + } > + > ret = of_platform_populate(np, NULL, NULL, dev); > if (ret) { > dev_err(dev, "failed to register dwc3 core - %d\n", ret); > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >