From patchwork Fri Jul 20 20:42:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538307 X-Patchwork-Delegate: agross@codeaurora.org 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 6CDC26029B for ; Fri, 20 Jul 2018 20:44:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A48A28E92 for ; Fri, 20 Jul 2018 20:44:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D02328ECC; Fri, 20 Jul 2018 20:44:29 +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 E9F4428E92 for ; Fri, 20 Jul 2018 20:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbeGTVeY (ORCPT ); Fri, 20 Jul 2018 17:34:24 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:37435 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbeGTVeX (ORCPT ); Fri, 20 Jul 2018 17:34:23 -0400 Received: by mail-yw0-f194.google.com with SMTP id w76-v6so4813135ywg.4 for ; Fri, 20 Jul 2018 13:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kZqzsOhAVAnuiLN9UxFpNCriND3n/gBT6QxF4y70vw8=; b=MKBvTFp/W715Nq0XNhxNupxn59uwYtzncmnwbm5q0AXNOXJTrkMxW9Tz7y4SU22j7v qx7lF3/ph8RXUysHN6U8GEyyU/64I/MxaA2flaJsCJUhgkQM/kLqNBIPy/6g3aFneTOe msnCPpOQJcd8rY5F+Td9iLWl7RYhgMVYcDosE= 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:in-reply-to :references; bh=kZqzsOhAVAnuiLN9UxFpNCriND3n/gBT6QxF4y70vw8=; b=U5dsiGQ5MjC7Ebfqz6VYAtpzbu1bB7SQg0wPQYIc8NXIFBe4g8rHKfrchA6rNMrFa9 t0b0nrQAduc0L4QCRJeY9rejNN19tQl5E8Ety2aUv3WqxGBicaNDee7FhoPhkStckN3h 6sOEvdb9qMCNQvJR29hp/dfOLTLxIcktCfGBOPdmGZg4HSQD1XJHMV0scGuyXTXCY1yV 0Mv0csFP/VXx2/xpUFQMJ1rIct6HgrV4rbycSZeem3HoyVLL+4ck9p3HfAskJH2e+tv6 KmcuciH4dXWJW/fUkkqADCHca3fyyFArs4oJ6SSf955N1XKfuxTWD0fzsZ2a93AR1Rrw s+2w== X-Gm-Message-State: AOUpUlG8uNFSaRVRl9V35re7MXyO3IjeElYObZ90mLjr1cDU27vxDOka R6CpKFg91i4EvFbJgMhZ3WDcVA== X-Google-Smtp-Source: AAOMgpeZ7zcrdLDdxdi09mh6wgpkM1PG7t1FdYdA7VOgy7fq/dcSFYR3tnW9rEO0JAb4UJu0B8QL+w== X-Received: by 2002:a81:f208:: with SMTP id i8-v6mr1794922ywm.72.1532119467164; Fri, 20 Jul 2018 13:44:27 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.44.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:44:26 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Cc: Archit Taneja , Neil Armstrong , Shawn Guo , Lloyd Atkinson , Daniel Vetter Subject: [PATCH v3 07/19] drm/msm/dsi: set encoder mode for DRM bridge explicitly Date: Fri, 20 Jul 2018 16:42:58 -0400 Message-Id: <20180720204315.19054-8-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-1-seanpaul@chromium.org> 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 From: Abhinav Kumar 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. Changes in v3: - None Reviewed-by: Archit Taneja Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul --- 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 000721fe5ab4..29025d9b7c62 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -777,6 +777,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 @@ -791,10 +792,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)