From patchwork Sat Jun 16 05:56:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 10467885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22818601C2 for ; Sat, 16 Jun 2018 05:57:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBD8A28EC3 for ; Sat, 16 Jun 2018 05:57:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA1D628EC8; Sat, 16 Jun 2018 05:57:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41B9728EC3 for ; Sat, 16 Jun 2018 05:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbeFPF5G (ORCPT ); Sat, 16 Jun 2018 01:57:06 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37136 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbeFPF5F (ORCPT ); Sat, 16 Jun 2018 01:57:05 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 280086074D; Sat, 16 Jun 2018 05:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529128625; bh=rGTDH9jbGmxqAFdimC6EZENVdne0+Zz34XuqYgP2lB0=; h=From:To:Cc:Subject:Date:From; b=SWGabacmeIZCAu1Pr15/T5LFUq6V0XMExqgb7b48trvJ7C/pzIq9p+82D3G1IIJLN kp4V+QOKw8RpGIoEXhKOfiLQvRDhn/pXbeG15TC0a1kwjw9PTvXP/CRcH/kr14iK7C IBuT87sa2BgG0T4FrLmnQ1ra5xWuUXUDCTzRSaQI= Received: from abhinavk-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: abhinavk@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EA5AE601E6; Sat, 16 Jun 2018 05:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529128624; bh=rGTDH9jbGmxqAFdimC6EZENVdne0+Zz34XuqYgP2lB0=; h=From:To:Cc:Subject:Date:From; b=LgJZhHD8BFewx0mulNYBV1XOewJ9FPz1Ae5ApD0CNqE1/I3//Oo/uQcmkynEcqN6k PpNiNF8n3Utke4WL3YZKb+htPEUzHIvkA8HeNM9qVSFNpUllnmCesnAIpi67WiE5LC ldqOfWqw5blz69Xkns1AvFgIx6+PX7MH6/fy5w4Q= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EA5AE601E6 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=abhinavk@codeaurora.org From: Abhinav Kumar To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Abhinav Kumar , seanpaul@chromium.org, robdclark@gmail.com, nganji@codeaurora.org, jsanka@codeaurora.org, chandanu@codeaurora.org, hoegsberg@google.com, ryadav@codeaurora.org, architt@codeaurora.org Subject: [DPU PATCH] drm/msm/dsi: set encoder mode for DRM bridge explicitly Date: Fri, 15 Jun 2018 22:56:59 -0700 Message-Id: <1529128619-7703-1-git-send-email-abhinavk@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, DRM bridge for DPU relies on the default video mode setting to set the encoder mode. Add an explicit call to set the encoder mode for bridges. Signed-off-by: Abhinav Kumar Reviewed-by: Archit Taneja --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 4cb1cb6..0607ad0 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -836,6 +836,7 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags) struct msm_drm_private *priv; struct msm_kms *kms; struct drm_encoder *encoder; + bool cmd_mode; /* * drm_device pointer is assigned to msm_dsi only in the modeset_init @@ -850,10 +851,11 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags) priv = dev->dev_private; kms = priv->kms; encoder = msm_dsi_get_encoder(msm_dsi); + cmd_mode = !(device_flags & + MIPI_DSI_MODE_VIDEO); if (encoder && kms->funcs->set_encoder_mode) - if (!(device_flags & MIPI_DSI_MODE_VIDEO)) - kms->funcs->set_encoder_mode(kms, encoder, true); + kms->funcs->set_encoder_mode(kms, encoder, cmd_mode); } int msm_dsi_manager_register(struct msm_dsi *msm_dsi)