From patchwork Fri Jan 11 03:50:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 155296 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp119256jaa; Thu, 10 Jan 2019 19:51:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN5KG5y3vK2uiTL2BEn4IpBnceX0TXLuttzBp5XoK8X40cUfaHk0Wk0kfw/CmYOqefBWL8K2 X-Received: by 2002:a62:b24a:: with SMTP id x71mr13238856pfe.148.1547178700854; Thu, 10 Jan 2019 19:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547178700; cv=none; d=google.com; s=arc-20160816; b=OvTp0m7mhD0eatXf8lZb4IsNTYn1X3XbCPZ7FHtva6cJkmPVtVyM/hr/JryA3xPGcY s/cnkUiKvT41o3nHkoOyGDP39fMLpcUc/V7Y5DShx24xFzHLFaP/wMuIzHZzxh4fUbh6 b2tGT6/nbq5060RTpeLbGL+XLeSEca+eGlLV1TEbj5FDx7lUMry8GYZ2Yf3sW4JKFyNW Jq/9z6jzXcfMU7POXXFpL+cJEb22jaxNt2rA4pOXh6xjQTcolkwALFDiyJDQJo7tdNZd cZe9Q2YqmuZRdbfyJd2w1zbun1uayrlx7HDohij+ktBA26pc9vu76OTmmJHUR07wsmtf 3cqQ== 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:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=Zh2LOtCFv2+bVqeKx4S61O58iyTeHfvVcy+9KgwP74g=; b=09bCY2rL4r+NH+wiwPO+ZHLlelpj6V+CTNfh5oWLZHAGN3cQKrcw9qbbcEENmzfPF2 T7szLe9+i1kly/r2b7/Ng8+6NWZc2PvWlrfZozRTA0+h0HnDosqOcu3zr8l73ETuMYFY MAvY06+LwLk+mXtQAegq3SiXDvBIUdardXsJQQh6gAw9e5nZLzLxWMG/MmpwE9QccViq JeSbCosZhScNyQNaGrHIJ/eiV7QY6KYZEhiBMqeSSahqpS6NBHYzeK0NjSGO1N3ZJ3Pp Ke8sF1O/bkXgPfIFY4qCv27shXfWmBOjshOYAhkRV9M6DOGGpdNjFulwlI6+mD8ty3tn Fe+Q== 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s19si3811269plp.151.2019.01.10.19.51.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 19:51:40 -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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ACB26F515; Fri, 11 Jan 2019 03:51:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 197A36F509 for ; Fri, 11 Jan 2019 03:51:30 +0000 (UTC) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 214E0E26; Fri, 11 Jan 2019 04:51:25 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 04/49] drm/omap: dsi: Hack-fix DSI bus flags Date: Fri, 11 Jan 2019 05:50:35 +0200 Message-Id: <20190111035120.20668-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> References: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomi Valkeinen Since commit b4935e3a3cfa ("drm/omap: Store bus flags in the omap_dss_device structure") video mode flags are managed by the omapdss (and later omapdrm) core based on bus flags stored in omap_dss_device. This works fine for all devices whose video modes are set by the omapdss and omapdrm core, but breaks DSI operation as the DSI still uses legacy code paths and sets the DISPC timings manually. To fix the problem properly we should move the DSI encoder to the new encoder model. This will however require a considerable amount of work. Restore DSI operation by adding back video mode flags handling in the DSI encoder driver as a hack in the meantime. Fixes: b4935e3a3cfa ("drm/omap: Store bus flags in the omap_dss_device structure") Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index b5685018d830..64fb788b6647 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -4751,6 +4751,17 @@ static int dsi_set_config(struct omap_dss_device *dssdev, dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH; dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW; dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH; + /* + * HACK: These flags should be handled through the omap_dss_device bus + * flags, but this will only be possible when the DSI encoder will be + * converted to the omapdrm-managed encoder model. + */ + dsi->vm.flags &= ~DISPLAY_FLAGS_PIXDATA_NEGEDGE; + dsi->vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE; + dsi->vm.flags &= ~DISPLAY_FLAGS_DE_LOW; + dsi->vm.flags |= DISPLAY_FLAGS_DE_HIGH; + dsi->vm.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE; + dsi->vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE; dss_mgr_set_timings(&dsi->output, &dsi->vm);