Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1231073lqb; Thu, 30 May 2024 04:35:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7R+aCoJc8gIkBuClSD2S7reiTKsxMO+1ZHFE52s7bMalNpDhywMS1uES1g4H8Lge56dqgK8xmmC9tO18lGEbI5Oj1cuYsxS9IbDDN0A== X-Google-Smtp-Source: AGHT+IEPH4hD+L50eQaVgz/N6UyC/cBtEVYUAsAQpYRiumOJhkGf6VlVtxNkJHZba8KWX81hNcmG X-Received: by 2002:a17:90a:3f87:b0:2c1:a72f:23f8 with SMTP id 98e67ed59e1d1-2c1ab9f5117mr2020598a91.17.1717068917416; Thu, 30 May 2024 04:35:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717068917; cv=pass; d=google.com; s=arc-20160816; b=y4dBxKsrRkm1t9gRUrKVin83uWi9ppTlSgJ9wo8CXgWo1SCpkuiLHy8LpXMgVfMsqX +C6qDYro70RA/mjdPjeFVWl+vLJIoeazOetz8nDqfA/tR6zOdNcLUX3YBxVUkr6mEQ/s tl27AvyScP1ko1rnETiZhUqB7oYoJZm1z7kVw4XkhetSQkgmXz98HE49Q5Lr33L0+sOv BFoGHrIdJrAqcKBoaWX+DPn3Po2CgsY8f6tGi3I9v9FiteOM4OB1RKQ1YKWStijpBgeu kjPvcXRg4idKG1rsYem+/b5zw9qNJxM2NrvAvpWNlFEW+VwjA/GKdBr/LDTyCZS8X1lf mTcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wxpMuKi+LXyXGnJgFY2tdfzN1kQoY6oVI5V7Y+J38bw=; fh=LJjh2h+0XYIrXG3LdUDfv23giGGnA12e+HAO3k/oHrc=; b=ed6SgIBH56Iqd20YhzE6S/hkDTX+gO3slMEXQfURTVKemL9C5GgEHQADSMGztgS4d+ ypVaSUCk9MFhSBBpCoUO5OIa1l4psH/F/CWGq68lf3X6OFPmo50ct2cF/zhc/h03NFMw VoR6lFOq88Q9W+JhIROkSqoZST86A6u/yEtzhkgW0bUZ6Qp26T7S1bfba/OXhN38x6fA rhFoDNIiM4wu1BkIPkIXj0cCzUTFqwbCYNXenRF/jLkMklGGOT5sOGEj2g93Kwp46o4V XtzQYImLwdRFE2v2fCyNeLr9E7AKOhJLuM28zb4bm6Gral7s0Hs/hhy7Neo4lhqIZyRq DBXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lLlxvgAB; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-195309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a7764f9dsi1523389a91.21.2024.05.30.04.35.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 04:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lLlxvgAB; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-195309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0AF6A28261F for ; Thu, 30 May 2024 11:35:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 046E716F273; Thu, 30 May 2024 11:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lLlxvgAB" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E6DE14AD3B for ; Thu, 30 May 2024 11:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717068910; cv=none; b=WydBS8l6RfnkJLScpn2sx3FXxM5baDZXCi74VWPrzWfyxT2ysEU9BE3qNpkMQTaJqTeZ4GVBwfEHgzGvvV8FSxSmr6U0eAzvq//TFIb5k6P0/eJ0A83jC8xV5lhu/Q4EuoMn+vQKMlhCXSxLnU922UVQQA2paP96CDQiXxYNuTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717068910; c=relaxed/simple; bh=BoQASBPUqaQo+E82MXqt+QyRpl9UFAs3ffdChOkkvhg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rKXpq1q1UdQzJu9IeOcCzJOWAUyvv2aGQoNau104+oVNaSyXDQmVEnb/rO5lofpXLWp2XmWysfB3ehjBgqyEs9+klTvD1v9xzBdnNSdNPi/K4Aty9gJ3vSHKmMkYJ9YX7LM0OfZBbgr2pqbDUELke2INf7WksKpp9C3LQxHTO4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=lLlxvgAB; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-5295e488248so785427e87.2 for ; Thu, 30 May 2024 04:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717068906; x=1717673706; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wxpMuKi+LXyXGnJgFY2tdfzN1kQoY6oVI5V7Y+J38bw=; b=lLlxvgABcyzWQH1z+szaL7TMvs7nsN/R8J/XbIlASwDJiWGvg7VBTHtmDSheqibIv8 3HDm1N2fiOvzNhQKaM0+XxRLCGga48NMyOGaYIympGuJOIuVJWnucQtNcScGk6ALkLLx AykafTISeHdG97LZwitojPDiojnHWGnmiNu8wYTaskVK4GridXnxPBBKtc47fre0zu1d n5Vfh+3pYORJv3bpudocP18GX0eNqUwx4fDU+tQ+CnQ3cTj3kcb3YC+MeCsRAcnSZjM2 fZY/FraGjWurAdcUKRouBkt3cAW+R0kTn26ypOfGh/aSiu1U4dmxi7QUZ+8rhqyX32KR VfVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717068907; x=1717673707; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wxpMuKi+LXyXGnJgFY2tdfzN1kQoY6oVI5V7Y+J38bw=; b=J6yTuy3yG76juokm3u1Jn1JLnyqOJx/yRhxzpHE7kSe8dtzuIqafGuvx0OSBSTO++t kuUu3XF7h00oeE6ImtpG3x6FTFFP4bgb5ZaXTotJYbDSdXzNiqzYhE+i7HMh1aJo1opy xdH9rFsPmKgX1BLOFcD5vyXsC15vGaCSzNsXl9lWcXhGMv3d8xRzVomasNhrMbse19Gp K8KLuUTWgaII4H9SyCG5kU8BbyckrBq7Y6z3vwd7yK1/PMLXl9zTuV6ydqMRfSFzTckw JIV1/I8GHhDjoMR7xYl6TOOO/fkF6/1hNc7Xiy3eHMobRVJOWIVhPbxr3xRT45QdTMcM zGyw== X-Forwarded-Encrypted: i=1; AJvYcCWvRIAUExhRES+WV3ERcvgnlniAAj42kX2RiXuslbmV+9uyu8SE05ZlKo/VJQuSxnvKju9+7hk/7gGtDZPM+PfnIsofBAp5herh6/yh X-Gm-Message-State: AOJu0Ywa6/4U82QMQ3Z14dtx1/ZVELPIlMsBQ5eQxWN+gml7+YCW/9ag OdJePeCxSuHXh5nVLy6JTAkBupHus3HhY/kRve5+GanFLsdMtwJcAbDHu2ODl+4= X-Received: by 2002:a19:521a:0:b0:51d:9e17:29ea with SMTP id 2adb3069b0e04-52b7d422099mr1055198e87.15.1717068906185; Thu, 30 May 2024 04:35:06 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b7043b402sm344963e87.211.2024.05.30.04.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 04:35:05 -0700 (PDT) Date: Thu, 30 May 2024 14:35:04 +0300 From: Dmitry Baryshkov To: Maxime Ripard Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 5/7] drm/msm/hdmi: make use of the drm_connector_hdmi framework Message-ID: References: <20240530-bridge-hdmi-connector-v3-0-a1d184d68fe3@linaro.org> <20240530-bridge-hdmi-connector-v3-5-a1d184d68fe3@linaro.org> <20240530-poised-burgundy-petrel-7affed@houat> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240530-poised-burgundy-petrel-7affed@houat> On Thu, May 30, 2024 at 11:16:08AM +0200, Maxime Ripard wrote: > Hi, > > On Thu, May 30, 2024 at 02:12:28AM GMT, Dmitry Baryshkov wrote: > > Setup the HDMI connector on the MSM HDMI outputs. Make use of > > atomic_check hook and of the provided Infoframe infrastructure. > > > > Signed-off-by: Dmitry Baryshkov > > As a general comment: I really like it, it looks super tidy. Thanks! > > There's a couple of minor issues below > > > -int msm_hdmi_audio_update(struct hdmi *hdmi) > > +static int msm_hdmi_audio_update(struct hdmi *hdmi) > > { > > struct hdmi_audio *audio = &hdmi->audio; > > - struct hdmi_audio_infoframe *info = &audio->infoframe; > > const struct hdmi_msm_audio_arcs *arcs = NULL; > > bool enabled = audio->enabled; > > uint32_t acr_pkt_ctrl, vbi_pkt_ctrl, aud_pkt_ctrl; > > - uint32_t infofrm_ctrl, audio_config; > > + uint32_t audio_config; > > + > > + if (!hdmi->hdmi_mode) > > + return -EINVAL; > > + > > + DBG("audio: enabled=%d, channels=%d, rate=%d", > > + audio->enabled, audio->channels, audio->rate); > > > > - DBG("audio: enabled=%d, channels=%d, channel_allocation=0x%x, " > > - "level_shift_value=%d, downmix_inhibit=%d, rate=%d", > > - audio->enabled, info->channels, info->channel_allocation, > > - info->level_shift_value, info->downmix_inhibit, audio->rate); > > DBG("video: power_on=%d, pixclock=%lu", hdmi->power_on, hdmi->pixclock); > > pixclock should come from the connector state too. It's still calculated > by the driver in msm_hdmi_bridge_mode_set Yes, that's why I asked on IRC regarding the char rate and ALSA codec. I'll see what I can do. > > > @@ -341,8 +425,11 @@ int msm_hdmi_bridge_init(struct hdmi *hdmi) > > bridge->funcs = &msm_hdmi_bridge_funcs; > > bridge->ddc = hdmi->i2c; > > bridge->type = DRM_MODE_CONNECTOR_HDMIA; > > + bridge->vendor = "Qualcomm"; > > + bridge->product = "Snapdragon"; > > bridge->ops = DRM_BRIDGE_OP_HPD | > > DRM_BRIDGE_OP_DETECT | > > + DRM_BRIDGE_OP_HDMI | > > DRM_BRIDGE_OP_EDID; > > > > ret = devm_drm_bridge_add(hdmi->dev->dev, bridge); > > It looks like you're not setting either the supported formats or bpc? I've added what looks to be sane defaults to the drm_bridge_connector: RGB only and bpc = 8. If at some point we get to YUV or HDR support, that would need to be reflected here. -- With best wishes Dmitry