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: 11252685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5633109A for ; Tue, 19 Nov 2019 21:42:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE7E92240D for ; Tue, 19 Nov 2019 21:42:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE7E92240D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.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-Google-Smtp-Source: APXvYqwN/eyaWDtN0T2DivmihiRjPrfTNLBpp4c8KNaDgHf+GGH+luUgDARapbxJL6lM1g3J5KLPpg== 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); }