From patchwork Tue Nov 19 21:42:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 179788 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1220325ilf; Tue, 19 Nov 2019 13:42:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyPlKj6DzzH9Rp3yfKveG3icYWk7B7UkL1UXCBTC+AVPH0B9hO8o7CdoLHmLgfVAIUzFAig X-Received: by 2002:a17:902:744b:: with SMTP id e11mr36047546plt.208.1574199770477; Tue, 19 Nov 2019 13:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574199770; cv=none; d=google.com; s=arc-20160816; b=hf9OYdFy1VMiEl+UOnUGOW9vhlulnUuomY+P/YLyhILWaJFgqK8X+C+mmuCKz//4KI xYpl4H9+q/41gwiPUuJ8N7UEJd+1yUESnbUQ0LTJ8Qa+W3pMp2FEZvOxCQ6tPoImJgfm QuEraIXyrD4k5iCBVJMccpY852o/Q/OaO7/YSILdb/7jxInziWSdKuKVGpx2xwcasMfY uoAXfkZvY8tiIpkRfFY/WIfgTlQy61WKhfInv3hOl1in8CKYxJRdudWaBRZ51DBjjXJg OFr8ILSrCNRc98t/8NlVdt/NF6bMS075hvuCdxGF5xJ/fnifeVcOSH4QIdTUUsCkRvY2 /NnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=fZKfl2IU2x98l3ZeH7d9K39IMWYcpq9LbdvzTzjH6ok=; b=yhltrHgLp7xR+6oGYF3AxKkhk0qYPWsZWBLd73u6yd3lJ8I/EY3Ue6mjW45DovkiOU 9cIq1qeYBxlIM8M5qgErCtLGDwBczBPKpqA5t8wQ44HhPT/VNEK+87MQvWI09JiXT3EQ wb2ArojiZQlvZ/VWnzC9D1PXPvUOgPNZ20BZEcVSmNQsEY41onMuwPcztgKYGTUrTcRN 7qi4WxF5Xoqp7qyaNBfK6kGhOGXhkyFCYszD1f81gwx3MrrIi3xB1iEidRyB5pg4MEbn GLqTVGJmCPzDkk0xFn5CoaE6kwxl7iEwJ/nkjF/N9Dg6FzvdchN5cv2ndLnZHuPT6/0J qayg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x18si16469757pfn.125.2019.11.19.13.42.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Nov 2019 13:42:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C6E66E40A; Tue, 19 Nov 2019 21:42:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B71E6E40A for ; Tue, 19 Nov 2019 21:42:46 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id d5so25084002ljl.4 for ; Tue, 19 Nov 2019 13:42:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XQwbcad//Pe4uYDzL68QH8A/dhMUUQ9ecZejem5rxiM=; b=UbFee8TO48uc0yoQRm7Fahh5s245tcbuL0VclfVkR2KZHhcQG/xjd3BVy7N4caQzvy lKc/tMvndPKkOnMsiCmdxKGEFnplB9pJPYT2ttXsrqTLsA79/5Bz3OntcUE55a4MnzeT HHXPK7gLMRhbqm79CXsivt2CBKcoQuumfy6qwCykrk4SFjJRW4OjkfcOVaeLKI3hQOym wdc8jiIAyj6cBIkeZashn3VS9srgdoEmSHUSgrzw4+5qGNsvRham0vKKZwgWDnEnhB9b TU1BTnOBpM8yJXjXKkQ5iU6svHir0N9VxbGLix65AQCQu1oa7Y9RYEolsLvMKlrxNJaj mJAg== X-Gm-Message-State: APjAAAUaVdiotPczEAqq84Tb+BRyoXY2NKjkEwOb8q62uiAFsthbJUce MVGxqsOIbAEg7iHQpbanV2pXqhKng3SOSw== X-Received: by 2002:a05:651c:95:: with SMTP id 21mr5805470ljq.40.1574199764396; Tue, 19 Nov 2019 13:42:44 -0800 (PST) Received: from localhost.bredbandsbolaget (c-79c8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.200.121]) by smtp.gmail.com with ESMTPSA id u5sm10829885ljg.68.2019.11.19.13.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 13:42:43 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH] drm/mcde: Support using DSI in LP mode Date: Tue, 19 Nov 2019 22:42:34 +0100 Message-Id: <20191119214234.27932-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XQwbcad//Pe4uYDzL68QH8A/dhMUUQ9ecZejem5rxiM=; b=cGYm68rHZuLOe1+MxZNpcDmEEX13/yAjIzEFaSwcLvgbinvb59QiB2trvkZdyePMly KUB2rdO9t8xA4j2pMhLlZtuM9poWU70pdeb78rQGxjjNbHKI6Da9oGVRi7nPFpEAgnyK HC6coOrYA72lun1398rVBEdelKiIvxm2Lfz/il23K4nv9vEutoTgJPHGnRj+Qs9YhMEJ CrQH3RA7CHc4FnTdXFRQ9cKkcHc3jVnPQPOXr6Mah9++DjFMCxzAP8oN1S8cKP6K4XTm TJxhIP3dCYTrYwSp/iaSkOfTawDnwKyVaxfd1FQyegH+Q6GztRnuCh2yQIbAln1RjpRs oXKg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephan Gerhold , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It is possible to set a flag in the struct mipi_dsi_device so the panel is handled in low power (LP) mode. Some displays only support this mode and it is also good for testing. Cc: Stephan Gerhold Signed-off-by: Linus Walleij --- drivers/gpu/drm/mcde/mcde_dsi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 889c39efa80c..d4a12fe7ff01 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -648,10 +648,11 @@ static void mcde_dsi_start(struct mcde_dsi *d) /* Command mode, clear IF1 ID */ val = readl(d->regs + DSI_CMD_MODE_CTL); /* - * If we enable low-power mode here, with - * val |= DSI_CMD_MODE_CTL_IF1_LP_EN + * If we enable low-power mode here, * then display updates become really slow. */ + if (d->mdsi->mode_flags & MIPI_DSI_MODE_LPM) + val |= DSI_CMD_MODE_CTL_IF1_LP_EN; val &= ~DSI_CMD_MODE_CTL_IF1_ID_MASK; writel(val, d->regs + DSI_CMD_MODE_CTL); @@ -740,10 +741,11 @@ static void mcde_dsi_bridge_pre_enable(struct drm_bridge *bridge) /* Command mode, clear IF1 ID */ val = readl(d->regs + DSI_CMD_MODE_CTL); /* - * If we enable low-power mode here with - * val |= DSI_CMD_MODE_CTL_IF1_LP_EN + * If we enable low-power mode here * the display updates become really slow. */ + if (d->mdsi->mode_flags & MIPI_DSI_MODE_LPM) + val |= DSI_CMD_MODE_CTL_IF1_LP_EN; val &= ~DSI_CMD_MODE_CTL_IF1_ID_MASK; writel(val, d->regs + DSI_CMD_MODE_CTL); }