From patchwork Thu Oct 18 11:19:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 149120 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1835500lji; Thu, 18 Oct 2018 04:19:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV63iVHmI01egSq6ELKU8T7atx2bZ4GoR9RcrEsQhodoJKGR5FJu+mMhUNy0h6A1okt8C8xfW X-Received: by 2002:a17:902:b403:: with SMTP id x3-v6mr30018134plr.237.1539861582638; Thu, 18 Oct 2018 04:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539861582; cv=none; d=google.com; s=arc-20160816; b=gQDk6oi3ZBM89bs+QwZWUs9HwNtsh9djs2Vv4w6Bl4k0ifrs+URAzOad3Q7jSol2yC bYd+7OGqmHsla9LOB8XljEA4TqgudvOW9mpHB2iP0OcYuzBTItnuKpFGZXcw/uZgaLnI cDEqrgVICPe95AK531ckVeWuGywhwvLVeeItUZGb6iRrPwQY3qT8az7Dy0Sm9Yp02AeA hsUMI4C8Cx3Jl0kRCvht/O2zhPlLdyjjRNzAjnrXOWDRBEZJDfj+A/UnZBSlIYSDVGAd v92+Dw1Zh8DtoNqHJ23yOQ2OUsmixfAM7YTOgfpCDs/uuD28AeN+TpNHwgujgUnpMMwG YSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to; bh=WakNeWhmfEHcp5B2DLMQ16fSGJla43u/uNUAjFVSh+U=; b=KeS+0zBStoDSUMLGq8rjAbsdF+v/ysoNPogPCd4/8t9EC5XmWZpvGJymL4u0WUk1+3 k01S9pPO9o3Q2Gp1ejUuQbmsQ5YG7InN8zqqNR4kuyr2XBHgWQtwNULKyc5iRp+yxHmy 8VzoZxlrvvuJJSGoR2+qwnGfJg8/X0UcgufpIUwwoiWPWzwgTT40PHng7oAuqmHyvwkl HiugCxbJdJ6Y1/nQ6/tv2a/z0fkEb81ztYiT2U8Q8FZZQa73u58lA7Q9bRm88rhGCb5M UhQh9ZJpn7m1BluL2JVlwu0kx7Sgx0m3FsH2X//8OzUP05dY388P8UsgAy4XS0FTIJvm NOyw== 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 w7-v6si21283694pgh.131.2018.10.18.04.19.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 04:19:42 -0700 (PDT) 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 CFC89890BF; Thu, 18 Oct 2018 11:19:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id B52E7890BF for ; Thu, 18 Oct 2018 11:19:09 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id d7-v6so1668938lfi.2 for ; Thu, 18 Oct 2018 04:19:09 -0700 (PDT) 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; bh=JCFudUA25pSnlZE45WxJMy0H/eYshQfYbRDndPN0Ilw=; b=KmIWtLWaK2ZFKpdIA0X6aFusHxn2RtK6KoW3at3pV+4dFrCXqzrzUI2yYbEyHKmm3G GDLGwT+pNeg4RBiOuKsERvQ3EPdtjL18T3YdtFgLSGGTKIJT5fPFCvgKz54WuExAuMg5 JB6nO6JOJ8jIvCAVN34hsb1GSVJYRnM8m24svwFa0ys/XopScfJMtyphkpxzEvBCPQd6 Jz7oIZmV9bYpiP2tyqk6V8IOONk4Qxbb72wR5MWODtCXP3o3GXHcHk8HXIrADbQpN3FQ VNjuXWuZxKJxHZjgePjmObD8Y3yxMbBJtPkU4JgD8Ah9fB3DZ4lPicp4ulxwaxqfX3YC 0ojQ== X-Gm-Message-State: ABuFfoj5rCO207zZ14NBv268HsXT1DKml6GXiIoYgzY4trehSxC6wOCE dHwk8mGOY8nh1ssn8RafOPSshukx59w= X-Received: by 2002:a19:d58b:: with SMTP id m133-v6mr18294242lfg.105.1539861547819; Thu, 18 Oct 2018 04:19:07 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id h2-v6sm4386331lfb.27.2018.10.18.04.19.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 04:19:06 -0700 (PDT) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm: dsi: Add lane clock rate fields to DSI device Date: Thu, 18 Oct 2018 13:19:02 +0200 Message-Id: <20181018111902.31738-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.2 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The DSI devices have a maximum operating frequency specified in their data sheet per the MIPI specification, and DSI hosts that can scale their frequency need this information to set their clock dividers right. As current panel drivers often lack this information, specify that setting it to zero will make the DSI host use some reasonable default. Cc: Andrzej Hajda Signed-off-by: Linus Walleij Reviewed-by: Andrzej Hajda Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
--- ChangeLog v1->v2: - s/*_rate_hz/*_rate/g - s/operation/mode/g - Clarify that zero is only allowed for legacy drivers --- include/drm/drm_mipi_dsi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 4fef19064b0f..da3499de2dc2 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -168,6 +168,12 @@ struct mipi_dsi_device_info { * @format: pixel format for video mode * @lanes: number of active data lanes * @mode_flags: DSI operation mode related flags + * @hs_rate: Maximum lane frequency for high speed mode, this should + * be set to the real limits of the hardware, zero is only accepted for + * legacy drivers + * @lp_rate: Maximum lane frequency for low power mode, this should + * be set to the real limits of the hardware, zero is only accepted for + * legacy drivers */ struct mipi_dsi_device { struct mipi_dsi_host *host; @@ -178,6 +184,8 @@ struct mipi_dsi_device { unsigned int lanes; enum mipi_dsi_pixel_format format; unsigned long mode_flags; + unsigned long hs_rate; + unsigned long lp_rate; }; #define MIPI_DSI_MODULE_PREFIX "mipi-dsi:"