From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 60C7718CC05 for ; Fri, 18 Oct 2024 21:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288165; cv=none; b=XWAjZSPfV66Icr9Dfo4yXxS+GYGZO7EyHAwaN7eQfoPaPUM4ceq5O1Y+QZWtn5PQXXgIr9fnSlEuH7ryZdMw8pbgDcRlhBjcXc7KkuyNHxxtsEwI9TCP9HkQw2bPAoUPiYzAz7gZzUsHFJhj5sXCy7HEBCszG+r3FE8iOqz/rlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288165; c=relaxed/simple; bh=XEeB8zSmc5l7zbT8EsjhmWQeibYM5q3N2PhNmNxtKME=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QpqWtGWx8MJrWfjUkOt9GT62EsfCsbjhzWPo7Tn4UborVFpQI+lJlmP3mF1yT9x3UizKUIVx3a3MBZe4Hr0lw9RoSntLC5EwU3Yuk/aKbRUkCVzxH9HGEaLnB3P1pGzWhPR0s8zNGhvssLtAUlD+cH24q52TtBk6c5CW8I4cEuU= 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=DeUtON0E; arc=none smtp.client-ip=209.85.167.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DeUtON0E" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-539f7606199so3077771e87.0 for ; Fri, 18 Oct 2024 14:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288161; x=1729892961; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9z8gZhR6xKvHdHJfRz4craU+dxQh5f6YMki2hXyc4YM=; b=DeUtON0EgdAFECGxvmiXBwaURSfnd4pqCy52M9CUwZbK7UKlC5G8XQwtWJYhqh28J1 N8v600XIjW2ELh2Kd7zfGxGikvPpwLyg9v5efDc/JG8KNFSVR/FEuXB11Ny30VuejE5g 4KcJy00afbJvJjaVSaQOFuztydWJ29o76V3giH/EZMmd/0oUcelWw9OWvMS6VMho7eWS 9+UliBzy12sckF+AHyYTXVy4xxraSgzeJqlIkqAdAcw0ThUiWuZ8bM1vqlLYzWTJeqJ7 HAU+CRRgJLUHxBp3TfjG+7y6UF5X4VOYh69A0vYvifx6R312zP/0Nn6y/mqs6zFpBCdN zEJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288161; x=1729892961; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9z8gZhR6xKvHdHJfRz4craU+dxQh5f6YMki2hXyc4YM=; b=jz1ZDBuECcpHhWf59yMR03o4YeOslXVgHxWdocwxCKYF1lAmdK5boamo9WMJWIwbu3 vAdZbMEoYyKv2JVBp+1fnVs7QlIwrvH+78Yza+Z8AUC8sKCh0zt0C8AvJMwy+Guq7SN2 QorIsFvRHI90thgxmsxvvC1JpJrZNjifKT2KVVj2FxKEtCDQocdPLCbYLmQzYez9aM3Q nZy+fYbgqo+GtgtUaP4pp9wH+81VoMh284Prvlpu8BiQUIQKshD3LKyhmeiyjW9wBSs/ GnXTcr+8bueQ6uSaBUAZuPv73LpCY7ztkpEVgy93yF8stsB95YIy48360+UWD6qqnvM1 yPow== X-Forwarded-Encrypted: i=1; AJvYcCUi1+lvpucJzpZTP16rwdpWmfULO8q8o2gYsOWBJtQ+c45bu38W6KomExe8ZeGetLxhGfXXXl+Jdt6dLSA=@vger.kernel.org X-Gm-Message-State: AOJu0YxRJbusrIlcopGTlp42xDiiu5tXOC779HrY44GdyuPU8AGjWqpD 6MVa6O2G00yRmq5wiVv1jlacB4nrIWwtXt32qwOgP7mWDq0Gok+gOt/fPjOcmG+RLP6pLRoqtBy lL5Y= X-Google-Smtp-Source: AGHT+IEvBA85x80m9/B/gJoVTav3nM1QjDIWITUKAkImXSQZnUaTDoetNxkyXbVIvGvOnxTTs+hpZQ== X-Received: by 2002:a05:6512:3a8d:b0:536:7362:5923 with SMTP id 2adb3069b0e04-53a1520b285mr2619592e87.1.1729288161371; Fri, 18 Oct 2024 14:49:21 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:21 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:12 +0300 Subject: [PATCH 1/6] drm/display: bridge_connector: handle ycbcr_420_allowed 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-1-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2190; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=XEeB8zSmc5l7zbT8EsjhmWQeibYM5q3N2PhNmNxtKME=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnEtfdkI2xvvDyeAfQVDQUi0tdefgLR6vV7buRI tI484ScB1+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZxLX3QAKCRCLPIo+Aiko 1WeWCAClFBFBl2ZmrqDc2fZN2aSCu3RdrzJkvaupwJdyhURATXsaWpT9bGsmOd2MjKTxT0Loq9p C8WpoBOLd6UjVr13L7T8l6Sq3H77uEMREgloAxbbLVaW05xKTeFdS/KSTJr5oABdtTDqZzsxg0a slmypGrkSSKs3m2pJ/DXM/2yZYvIrGD8OmlpV1P5VSrCKXjNvMsek2LHuHrBDKxtfqjjTxMjDIl /ZBvupf/oBQ5XheDg1XSudap4ydX+m2c6+pZUkxgA/53WVDoyKOv5rDrinCM9gnbKDAFnC8Cm6z PiycyIZiFvnah4d49hQ0ije+kgj0w9K8xM9FIx6zlu5k5KN6 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Follow the interlace_allowed example and calculate drm_connector's ycbcr_420_allowed flag as AND of all drm_bridge's ycbcr_420_allowed flags in a chain. This is one of the gaps between several bridge-specific connector implementations and drm_bridge_connector. Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/display/drm_bridge_connector.c | 6 ++++-- include/drm/drm_bridge.h | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/d= rm/display/drm_bridge_connector.c index 3da5b8bf8259..320c297008aa 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -397,11 +397,11 @@ struct drm_connector *drm_bridge_connector_init(struc= t drm_device *drm, bridge_connector->encoder =3D encoder; =20 /* - * TODO: Handle doublescan_allowed, stereo_allowed and - * ycbcr_420_allowed. + * TODO: Handle doublescan_allowed and stereo_allowed. */ connector =3D &bridge_connector->base; connector->interlace_allowed =3D true; + connector->ycbcr_420_allowed =3D true; =20 /* * Initialise connector status handling. First locate the furthest @@ -414,6 +414,8 @@ struct drm_connector *drm_bridge_connector_init(struct = drm_device *drm, drm_for_each_bridge_in_chain(encoder, bridge) { if (!bridge->interlace_allowed) connector->interlace_allowed =3D false; + if (!bridge->ycbcr_420_allowed) + connector->ycbcr_420_allowed =3D false; =20 if (bridge->ops & DRM_BRIDGE_OP_EDID) bridge_connector->bridge_edid =3D bridge; diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 75019d16be64..e8d735b7f6a4 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -802,6 +802,11 @@ struct drm_bridge { * modes. */ bool interlace_allowed; + /** + * @ycbcr_420_allowed: Indicate that the bridge can handle YCbCr 420 + * output. + */ + bool ycbcr_420_allowed; /** * @pre_enable_prev_first: The bridge requires that the prev * bridge @pre_enable function is called before its @pre_enable, --=20 2.39.5 From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 2658B18E368 for ; Fri, 18 Oct 2024 21:49:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288167; cv=none; b=QhBtYxx58RYUf+euNGDU4ZROhiAOPaT3K+BC5h2MDiwfo+MG9vaS+UIasEf1UJuSIT/u+VlhXRTV0qgOIWr4VsBPBXTe0rO/GmgPeNxOP0ONXIp7UJ5TlvrKzZ+zXpx+sCBiK43alWRwitJ5a53G8mK9VCVM8STziKqcxV1v33o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288167; c=relaxed/simple; bh=bRmnoe4tVoeG590rXiMuIqAybo/BJ38wHNkcgqIlmso=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X72ShIR7aE0FEQb5908u4JngwCp6q37IdOpSFdiX1y+W01NXYYGdhLcRCyy+FZtVseJHMGZB/l4Q2vvEubI5oZpflSrFls1w7xfqjnybxaw9GcnT62aqH0oRP9aCeZTP9nwBpPvUxfuMYLSEVmqlLStq8g+Rcd4Mfa+08iW7kfA= 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=mHc50/DB; arc=none smtp.client-ip=209.85.167.47 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mHc50/DB" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-539e3f35268so569138e87.3 for ; Fri, 18 Oct 2024 14:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288163; x=1729892963; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Go5ATa3ANcllBgMb3i995a+Tn/9iklS8uo3r/4fZl+Y=; b=mHc50/DBWSvHrt7tVmOY6bhi9YwBV6stq+zQ7jADyZvkKNVDV0AX2+qNYjttYQUjXJ wlT/Ex9MDHCDGKvjHSDj0UyGECIbp9Z9g1Sgp6YRHgQfnUZ2dKnrZiqm1uJ4nf9A+ow1 MLXcofCwRWbrew7DiEZ7PJe2sUa7GRE2F9DwpRYZVINRENce3IVj8Pq1PF2OGE6M4nib M8skRUgWLaWEq8F//GWkqgofohK4lmkA3RbWo05VpHzOI4VABqFbViH0OtqM4CA599zs K2/bF7gAXdFQdqPthVtHvid9Uzz1DDB66FZSr1G5vvcN25nDPHk61A8qGckCJXPM66Wi Z5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288163; x=1729892963; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Go5ATa3ANcllBgMb3i995a+Tn/9iklS8uo3r/4fZl+Y=; b=TBZSs+1IrFsqUNTB74eKdopteSgz/0ArvVTXkBgs0mE1wniTZ/Wq6eKzjXi3h32sIQ vNAI1nEkAye2MK7PyU5qKMLNRw3eOJcM2t5cWlDXODpXO26FortXMIbpur/tPolm63B5 eMM9GH5QpEakxJim4S3EhVM29r0mBd1GLCFs6TFK5v1UkrpyXtuSC3zYOFu/bqZw4EBq XjE1CvcQQbp8jHuAoYVwSQARsfHJQVIy011lfCUoWbldVMW92vjmaxBvJvm2Ei+kpIca GSiw/LwBI/cbwKiKp9RBlJ+OcKVUIyOU1k5es1icfxq0OTyWH1BoGaR7QAiOAyp0RzAG dGsw== X-Forwarded-Encrypted: i=1; AJvYcCUSJuiocZcC65txMeCWlDI97Ib0Ft2Xwqdr0WtMqKz++l662awoprD9QIV9Zg81zut3kfl+mY4PyTNK4lg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxsgu1mqW9rOdjQTzZdyAYY+6CgDxv/AWTV5ynQfkxazSy9aTcB 3xXqFdExHvrlZFLHJy/E5UEqjCF4bLNDNDaeQ2+ZHRd8eBIEe5921bPGMsQ/dg0= X-Google-Smtp-Source: AGHT+IEo/FMuV8BXcaeTLXW0eKYEblPO9D0Z6JBXczbnQvEt9ytqgCebRe6synIHwL/ExZe7lEvCMQ== X-Received: by 2002:a05:6512:3c9e:b0:536:a695:942c with SMTP id 2adb3069b0e04-53a1520be7dmr2388053e87.7.1729288163023; Fri, 18 Oct 2024 14:49:23 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:21 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:13 +0300 Subject: [PATCH 2/6] drm/atomic: add interlaced and ycbcr_420 flags to connector's state dump 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-2-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1201; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=bRmnoe4tVoeG590rXiMuIqAybo/BJ38wHNkcgqIlmso=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnEtfdV58nH3hPAsgrDZ9l/GYMAVX0S0QXyB3Om au9VDJz5tGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZxLX3QAKCRCLPIo+Aiko 1VjhCACxMe6Efsk0jMD+km71rST56+FRiTPqH+ulz1SSX9gFC5ae64pRNdtVSouzjEQta4XWO55 TR8odbc1YUb62bW4jdPyQ6hWGQ+m2pnJ76JcZTNomBlvh9WBURN/nn7j3Izw6QJK3o/hozejaOu VVfbcWJGzREM7vnHQV3i5fpBqIbd31u9+zf4karPkxgVnUj+6FuOCVsmV/Fp1rRJZQKlpiKq0yd MRJFtyJTPKHvXbPGc/wautX5WvPq9TLXrfb8bbaATPxf3th7DP5WbsDfNMSyrfyOjEMsspoQ8Jd YGmInnt4UhpdCGWANP5rPQGdkFDWgZc3Rs/ou8nS5YNF2/Go X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Although the interlace_allowed and ycbcr_420_allowed flags are a part of the struct drm_connector rather than struct drm_connector_state, still include them into state dump in order to ease debugging of the setup issues. Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/drm_atomic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 0fc99da93afe..9ea2611770f4 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1132,6 +1132,8 @@ static void drm_atomic_connector_print_state(struct d= rm_printer *p, drm_printf(p, "connector[%u]: %s\n", connector->base.id, connector->name); drm_printf(p, "\tcrtc=3D%s\n", state->crtc ? state->crtc->name : "(null)"= ); drm_printf(p, "\tself_refresh_aware=3D%d\n", state->self_refresh_aware); + drm_printf(p, "\tinterlace_allowed=3D%d\n", connector->interlace_allowed); + drm_printf(p, "\tycbcr_420_allowed=3D%d\n", connector->ycbcr_420_allowed); drm_printf(p, "\tmax_requested_bpc=3D%d\n", state->max_requested_bpc); drm_printf(p, "\tcolorspace=3D%s\n", drm_get_colorspace_name(state->color= space)); =20 --=20 2.39.5 From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 81AD9190684 for ; Fri, 18 Oct 2024 21:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288169; cv=none; b=ThGTXj2PMWwaZRdGTQJqNoKDMWlZpITmePj2z01H95FW7JHuIqAhFGnMEVY2FJlpzU2w6GNFwfu1jvb/p4npl75mgTrnYcQf1UtJ4bBOHcdhAeBAO0td+uJlQ8MMFS5tyd4vTHtSMaYlaGYTAHp7jH2wTw5OeNX38H6phRgIjyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288169; c=relaxed/simple; bh=pZFlU5ikCJDIckLBlIAUq/awzCCp0+P63uSXEOzs+Ls=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VR965Tb+OqlCnPJzj+c1nzH7oPlYecvHQC0Ysh4XYCemYdN63BrzqCoNgavq3rFQ2syx9a1qIBeDvDgIjw2xWT6Hr+iUrN8HpCp63xrTn0HHZScFfZagKajUUceyUZzLd+gHVqlFrV5wyY+vhACVfN2cslPEbxUTXCKVbT0sPYc= 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=RnSVngvx; arc=none smtp.client-ip=209.85.208.179 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RnSVngvx" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2fb584a8f81so30886011fa.3 for ; Fri, 18 Oct 2024 14:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288165; x=1729892965; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gaBPMg1AmxsxPM/D5Hee5JcN9a25p5bXN91ymYiIy5c=; b=RnSVngvxN4JjuEjR4yf2LQw34TsyqkI0bb1WsAncHKYRk4l7w+KWJ+wSJyJFPR6cQN kRGgWxKxjAeBxmX9Sec8yIegirMdFfFJiNV5XrPjcSadtMn2jXQV6WqU5xRQjSQaBina j39cxjpxrDTLyR1UxEp8O0efEldpLfsPdqFj2By6ruH6LzWVHadF1uDST3zNsjGbGSQc kNfWPawAX8i30H6tqP0oJJvu+7rX/aHq44TF79M8eHFmd/vTe6iQrxpHHAMadlxXQ3CR JFosKo9E677SlKYvurYcp2lZ3Wq00Bb+QKd5TCYF4NtX2Cu0pGK1hYvtslVR8yk0BuVx FeaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288165; x=1729892965; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gaBPMg1AmxsxPM/D5Hee5JcN9a25p5bXN91ymYiIy5c=; b=VtHPLquzJ0pnoT4lHys6yB26zbGZd0gsOZjz9wuUHxajRdS10x6mDkXtTnMzPQJ6ap JWE1a3uOAcpmm4ynCOWu0C2aXCfeBHfgOXWuZPzmxqyBM/IQU453tjaGsG9Y4GQ0a5EG KZfKqEfIDEo3MA6IP+yMPQ3N2pEyx/jMzwQjgv/g/1KVlLNmaqHqxOLOdJC2cEa1tZjb nOpTurn2rqeAHV6l5iRoI8MB/e/U4v+UYHhX0F/WbIO1nRgNzqdr1LNS/5eSdgWxL4pc zDLe5tq6xpirMrryTYt2ZVdM3H2lPu0UG1I6qLZX4v/g9b4X6vXqDj9Fgepi5EPuUyHp 4EDg== X-Forwarded-Encrypted: i=1; AJvYcCUVhukgyUHSsoslI57gJslXRDWoU5U3mYWxqj7PTxVSzMzrrTM8LW3MveNz0yqDQrNXJyEkPnFDBoGJDBU=@vger.kernel.org X-Gm-Message-State: AOJu0Yxja9vKtxJMNuqkMC15xK0VxjCy6FTxPKXseZpVLBL7RTFT+T2u Ylv4oZsCxNze1OU4RbVg6XfPtCmdXaCqrm+v51a6QqlI3iXh2K4HryWBd/dnAbI= X-Google-Smtp-Source: AGHT+IEwsp3DJLispc5Uu+bsLkWA9jEEfNgUg2fe0AkZdKhNFZlyKLrQPTa06UtCmputrUq6ijp2uw== X-Received: by 2002:a05:6512:1598:b0:539:f886:31d6 with SMTP id 2adb3069b0e04-53a1520bd09mr2482354e87.2.1729288165534; Fri, 18 Oct 2024 14:49:25 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:24 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:14 +0300 Subject: [PATCH 3/6] drm/bridge: display-connector: allow YCbCr 420 for HDMI and DP 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-3-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1023; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=pZFlU5ikCJDIckLBlIAUq/awzCCp0+P63uSXEOzs+Ls=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ7rQ9bvcVYyXhH4v2nbOrW+V56fz/nM6Ra8qGUUzfkmXz NR4wOHRyWjMwsDIxSArpsjiU9AyNWZTctiHHVPrYQaxMoFMYeDiFICJ+Gaz/2LKWimrkK2V+Hly 9qLrbbUCO2cI9V7mf7l3qX6f6v9FgsWWBgt90p1C/+yM65wm/SHu3mEdAWNz/tpN4YYiFU5P1vc 0LNFboKga0HF5U5fM7Oq8he8cZR9Fnt0edGyC6mfnsgcMTi6zmD7rOf7ilxVcwJA4Y4vzC0HHLd MPXdjRzXE74Nnk09ndskoTuzzXxz9uDuWW/r9NneNNSYEmx8q/Byp6Pau1Zh6cd+3RXtHmmmmbc rM3H4qPaGu5djjsyMtNhm3VfVzLRRbaaseJJq1Zx7iN3yRoqYnCtKbvZ4+qvz/wIeGu38/XHoam 8w82aNZNXnNxQqlatk+4mN4BlsZ0H2OThUov9TNsDCoCAQ== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other bridges in the chain still might limit YCbCr 420 support on the corresponding connector. Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/display-connector.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/b= ridge/display-connector.c index ab8e00baf3f1..aab9ce7be94c 100644 --- a/drivers/gpu/drm/bridge/display-connector.c +++ b/drivers/gpu/drm/bridge/display-connector.c @@ -270,6 +270,10 @@ static int display_connector_probe(struct platform_dev= ice *pdev) /* All the supported connector types support interlaced modes. */ conn->bridge.interlace_allowed =3D true; =20 + if (type =3D=3D DRM_MODE_CONNECTOR_HDMIA || + type =3D=3D DRM_MODE_CONNECTOR_DisplayPort) + conn->bridge.ycbcr_420_allowed =3D true; + /* Get the optional connector label. */ of_property_read_string(pdev->dev.of_node, "label", &label); =20 --=20 2.39.5 From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 3E9401917D8 for ; Fri, 18 Oct 2024 21:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288170; cv=none; b=RXn+hWxRqQOAMsxQ6v7cP+bTxmugBwLo90Q7tn91M+ylas4PHrZ0JMFqB6q/BFQvVLMDk/xOIMOxUnWQtY7ymxyFe28Yo3OkX/14bepBh8bvpw60glRTkuM2BgrdZau/M7VToUgjeZltlaivv03uaQPf6oVyYc3Taz+UX/KchgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288170; c=relaxed/simple; bh=djZfmDBuxlU0JNDnxFnHNPof6nNMCNv2DHOE5qEfzzs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ScA0oMEswhmWkoEIr2qQgr7czy4nth8PqjwIdnCXFKfoeSf5vfoUpiz6kL43L9zGIXgJlcuaodNo0s60aCgODWf+VM8r2ksFOJzIzzwnsuMd+SJkHPtWOwIRlJkxrhVDSkXXUimU9ZSdjz0xhQW83FFt93An61jKvT7YlPVDFGc= 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=L+bM2FKL; arc=none smtp.client-ip=209.85.208.181 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="L+bM2FKL" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2fabb837ddbso38139921fa.1 for ; Fri, 18 Oct 2024 14:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288166; x=1729892966; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=++kNX7bNku5QwEW8QyrZ4sh/fBENm2B/D5wgk1dPOsE=; b=L+bM2FKLoXe7BLUC0YnAsbvP1wRwSZQuIBUy3spNSgk0MzV/o0yZip2175Mff3FlVf XC+GCXqC/E2rafQ5CxkvBjT5Q+Jx/8RGsDQbLzQn9qCSxakxMKfAXFY17LGxV0TMs5jq 7HXGAx0JcYksXOd2jFBNaKCe4TD8C++fdR4W8ehWHWGEauGHtyJJT6hVLTv3YU0x6E/n IrReOkCA9OFc+KsDJTZbV5eQ3FAQkkUom67V+MHqOWu+ELg9VuslZNuGxnSKcTuT1U/N vHkvhmllazWOFS3OJXfm2N+fcfmkb3eT9sJs0hJL0HaYPDqo29lH/MiaKHdNN7MN6zCd +oAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288166; x=1729892966; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=++kNX7bNku5QwEW8QyrZ4sh/fBENm2B/D5wgk1dPOsE=; b=eDbKXfKwRS2iXAYwF7/8i4Z61RRmhVe+bVnWskwn3RNXev2I572iRGOYfywjdTV+Zc nG+VWdklQDfVE4IXfoSaAkWvkA04a510HkmhebbXg/aRs60shuKQ2rnasro1jBSSt8j+ BPT/Isxmqls/UKujCpq5rJO9V+SlmjzWmfGu/N3DZv582cyGX0ZvHBZa1sZcavcAZkur odBUyK7OCmkSmZf1io1g3hGpY1ViTeLnFHJMjRYL2ekRhry2KugJIEVmc+JqenuASSvn WOlxOp2vZtTyXvWSRgC/5ei3u75rSpRy8+4O8bEALL8MJSbiPC9MTo8XycQtU0Ic/pQp SxOg== X-Forwarded-Encrypted: i=1; AJvYcCVb3407Cg6iP9hJqdou25uq9vljHbEZXCMIcakwlnQX6w7MPHKoDluQcd1YKy4E6NATp+HwLjBJPnNAvus=@vger.kernel.org X-Gm-Message-State: AOJu0YxC+XT+TWut6xYXFtf67eqTX+SbXO5IgyH5NJ5iuoodJtW9y+ss 7C6Z9qllq2+1DBCq7GckM9GNjMfMvPcFsj1aQSq6lGq4uV3uXeNOuktz7WvxcD4= X-Google-Smtp-Source: AGHT+IEzY/SRAJiRek65ftXwRIaSZWszQ1TrTKHKVue2XD7qrdxALnnHFoS9HheGc0hNt3zatPurVA== X-Received: by 2002:a05:6512:281e:b0:533:4505:5b2a with SMTP id 2adb3069b0e04-53a15469bc3mr3671477e87.28.1729288166200; Fri, 18 Oct 2024 14:49:26 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:25 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:15 +0300 Subject: [PATCH 4/6] drm/bridge: aux: allow interlaced and YCbCr 420 output 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-4-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1680; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=djZfmDBuxlU0JNDnxFnHNPof6nNMCNv2DHOE5qEfzzs=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnEtfdxGkLweJv+OM6qHmNV/IfPe4ih05zIyoU7 kJT9651h3yJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZxLX3QAKCRCLPIo+Aiko 1Z66B/wOA1Y63ge3/9+ec5RRkm09oVvTET8CgLutvJicgnnXJpoD1xFAD9yeSZUxMm1JvpeCwUJ 7/e85Jbgvnv0rT3m0G3RRigczR8IgIBM6sbVOwA3aGTAKEQdERPTHo7uO3ViUrNHtHpLEVA/GhK 1H5b2Qp5xZP+xyI8bQD+sEWK49cJB6eEWw13zLPFj4VhFUtvpnG7Hmo+HbNLaShgegiXRUPxIth thR+rqDuF0nu2rbP+c3NaSwfcICzvALu405PAWooBekJ1qdYR/QzGQrHTvg8QBFwToKKLRi2sC7 5J73pzZSvULsbl0/BUhl5RdsXjYT2zNV6UEcFPLPEOR0pnPV X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As both aux bridges are merely passthrough bridges, mark them as supporting interlaced and YCbCr 420 data. Other bridges in the chain still might limit interlaced and YCbCr 420 data support on the corresponding connector. Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/aux-bridge.c | 4 ++++ drivers/gpu/drm/bridge/aux-hpd-bridge.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/a= ux-bridge.c index b29980f95379..e3e95ccec1ae 100644 --- a/drivers/gpu/drm/bridge/aux-bridge.c +++ b/drivers/gpu/drm/bridge/aux-bridge.c @@ -120,6 +120,10 @@ static int drm_aux_bridge_probe(struct auxiliary_devic= e *auxdev, data->bridge.funcs =3D &drm_aux_bridge_funcs; data->bridge.of_node =3D data->dev->of_node; =20 + /* passthrough data, allow everything */ + data->bridge.interlace_allowed =3D true; + data->bridge.ycbcr_420_allowed =3D true; + return devm_drm_bridge_add(data->dev, &data->bridge); } =20 diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/brid= ge/aux-hpd-bridge.c index 6886db2d9e00..48f297c78ee6 100644 --- a/drivers/gpu/drm/bridge/aux-hpd-bridge.c +++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c @@ -180,6 +180,10 @@ static int drm_aux_hpd_bridge_probe(struct auxiliary_d= evice *auxdev, data->bridge.ops =3D DRM_BRIDGE_OP_HPD; data->bridge.type =3D id->driver_data; =20 + /* passthrough data, allow everything */ + data->bridge.interlace_allowed =3D true; + data->bridge.ycbcr_420_allowed =3D true; + auxiliary_set_drvdata(auxdev, data); =20 return devm_drm_bridge_add(data->dev, &data->bridge); --=20 2.39.5 From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 9A7C2191F7A for ; Fri, 18 Oct 2024 21:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288172; cv=none; b=WwyyP3cVy36YWxOQ8ma1HGfwm7I8ONuyTF8xRF3MJEHtC9PkOyVBtjTZHBHKe2fGxn2j+c7E5040QqZC3582KNQS1oOsYPmc0qw+dW4llhltt+DcI/5TUaRihfxJ9FTsqdhQGuirrRHJ4aGyZKKHlYsnDZrJhtKkeMRhqP5qvgI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288172; c=relaxed/simple; bh=ugTosUslB7wYiUqpHQuS1lhI0s68LhvrkUMBV1pOZG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p+J5KcXCCgzBYAnkXmG3tWHz7GVwNeFfkK6BIjtnxAbZ2ozYEsnF4FwkqcDOQY+P8epJ5iYhq0hBZA6LZMeqnqgYjYtwMP+Z/dCmv/m14rGr1VaAKWVXjeU9/jRwx/D74h9VexXnanW3hcA01M8gNy+zf3aKgr9Rw+wNL1I6sYk= 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=kemSWovo; arc=none smtp.client-ip=209.85.167.45 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kemSWovo" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-539f4d8ef66so3691298e87.1 for ; Fri, 18 Oct 2024 14:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288169; x=1729892969; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7DkvTcvtzrj+vI5w26rcakY7Zkomm18gg55vGgQd3cg=; b=kemSWovoxGx6UMT3WhsSxWD5YdpmmmfDATNJwMyjWkIvCg5M4vaLZRVuBRKn3xXt2/ kYhGx/GIxU21lX4LI7pbsIkndBI9THzI04L6ELOSm/nwmp9ciXDypP6H7bNMTLG0tzk5 maalTOXLjSZqSQcDLUXOU0jSpSxB9EvgpAjYnGLNrHBsj9eKGkdVOaOqAvG7OyXQCybS s9sbBQNzkbRi1LnYCjfHoNaXnY6hNNRpuPJEXejYPI7HHMwhpSdQmpc1TCNa+SjkF03N gqOKRNUcVCCRGnbHrhW+EAZ7jv3m15jh1SQAXKg51q5JrcgBfI3UuDv5thDvm/Goe6Y4 YRlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288169; x=1729892969; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7DkvTcvtzrj+vI5w26rcakY7Zkomm18gg55vGgQd3cg=; b=cK+9iJ1v2MMsMohzEjK7KQs9VRWl0M8Z0k1dP7fPIaC46HVkwSIYV4RoaIm9j6W3Es hepyFqzO5YWTYiKb5kPEXsz36kM9nhKUmY6AHAhYhmmr3KmoYsLEBO1CHvLJAxM4OOxk n6WYgrDnyGfGOeIENTtDkt2WNe5uCYa/fQLFZJGNfdPUphlIteh/+vanJfcxyIbOKswt ZKfTjH0/RL68h8rOANJDa+7eCSVEJGteKhy+iYpPLWo7BvVzN6DlkStZzgksXSLRKq/0 GggpTURNSNOBoqgyTa57qSmBzRkLJrquh6L32ZBaaMBYEtQ3HmiCJUPtTuXnKQDAnLQz wHYQ== X-Forwarded-Encrypted: i=1; AJvYcCU9XPXaXizjnavHkB4C66flsmAV0tRS7Vqp61Ax9uaeOJSjwdAYqEBmcshQGFUIWpyBJqwce2pFzh1quHk=@vger.kernel.org X-Gm-Message-State: AOJu0YxLbFh/r+G2d5nXyu2tgw/QZ8UZYE5x9VQOluS17RCZt1TPdJK5 RNzz19J+ln7hnEcs99hObw9VNRat1fIL4+V/bNKGXaBJY0h0NonYVDI9YSPthz0= X-Google-Smtp-Source: AGHT+IEdC8loWBskIO3ec47CgiS3ugrBsDjwPbv5xYeMyu2Akw/gZ0odKdi14u5bdzJYJeWuO3Cw1Q== X-Received: by 2002:a05:6512:2396:b0:536:54df:bffa with SMTP id 2adb3069b0e04-53a1544c1e8mr2768234e87.45.1729288168661; Fri, 18 Oct 2024 14:49:28 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:27 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:16 +0300 Subject: [PATCH 5/6] drm/msm/dp: migrate the ycbcr_420_allowed to drm_bridge 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-5-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3851; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ugTosUslB7wYiUqpHQuS1lhI0s68LhvrkUMBV1pOZG0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnEtfdCMWS3IEeYl04oBE5MQmiiYn7fcPZlBXfM P3seFVF/PuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZxLX3QAKCRCLPIo+Aiko 1YMjB/wMXVy2Q15F0LL8KfsS+vI2vd9tB7X/2igt44qCY9V/YD7aYTGLdxLWdbcDrxQN5u9Mcwh zw1Jv6DFYlV1pFvCsNZUscq3eBivP0SSQWq5ASyu5y3KpXIEb4LIrWQdCuo34zNSNp1O2VqZUXc aYJwBkRlnW3GxmOtYp9V2o4IjKVWglBgHxctzLV0EQQshkTvWjUwSb2YjpNllMgZrQy2BU3cARG 2dxcJfnRCBNhorNeFbjps9ZBZo8NZXiehcXpL/MdalVwzWtwjA9OJjrheMeOKcDpuhRwk2hc/fC YODvL7pzINueMvI4JEybtw/B2labB9J/5nnSUiYnYiJ89NYl X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Instead of forcing the ycbcr_420_allowed flag to be set on the created drm_connector, set it on the drm_bridge instance and allow drm_bridge_connecgtor to propagate it to the drm_connector. Signed-off-by: Dmitry Baryshkov Acked-by: Abhinav Kumar Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++-- drivers/gpu/drm/msm/dp/dp_drm.c | 10 ++++------ drivers/gpu/drm/msm/dp/dp_drm.h | 7 ++++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/d= p_display.c index e1228fb093ee..0ddd8abca499 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1467,14 +1467,14 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, = struct drm_device *dev, =20 dp_priv =3D container_of(dp_display, struct dp_display_private, dp_displa= y); =20 - ret =3D dp_bridge_init(dp_display, dev, encoder); + ret =3D dp_bridge_init(dp_display, dev, encoder, yuv_supported); if (ret) { DRM_DEV_ERROR(dev->dev, "failed to create dp bridge: %d\n", ret); return ret; } =20 - dp_display->connector =3D dp_drm_connector_init(dp_display, encoder, yuv_= supported); + dp_display->connector =3D dp_drm_connector_init(dp_display, encoder); if (IS_ERR(dp_display->connector)) { ret =3D PTR_ERR(dp_display->connector); DRM_DEV_ERROR(dev->dev, diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_dr= m.c index 1b9be5bd97f1..7eb1621f9e7f 100644 --- a/drivers/gpu/drm/msm/dp/dp_drm.c +++ b/drivers/gpu/drm/msm/dp/dp_drm.c @@ -289,7 +289,7 @@ static const struct drm_bridge_funcs edp_bridge_ops =3D= { }; =20 int dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, - struct drm_encoder *encoder) + struct drm_encoder *encoder, bool yuv_supported) { int rc; struct msm_dp_bridge *dp_bridge; @@ -304,6 +304,7 @@ int dp_bridge_init(struct msm_dp *dp_display, struct dr= m_device *dev, bridge =3D &dp_bridge->bridge; bridge->funcs =3D dp_display->is_edp ? &edp_bridge_ops : &dp_bridge_ops; bridge->type =3D dp_display->connector_type; + bridge->ycbcr_420_allowed =3D yuv_supported; =20 /* * Many ops only make sense for DP. Why? @@ -351,8 +352,8 @@ int dp_bridge_init(struct msm_dp *dp_display, struct dr= m_device *dev, } =20 /* connector initialization */ -struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, str= uct drm_encoder *encoder, - bool yuv_supported) +struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, + struct drm_encoder *encoder) { struct drm_connector *connector =3D NULL; =20 @@ -363,9 +364,6 @@ struct drm_connector *dp_drm_connector_init(struct msm_= dp *dp_display, struct dr if (!dp_display->is_edp) drm_connector_attach_dp_subconnector_property(connector); =20 - if (yuv_supported) - connector->ycbcr_420_allowed =3D true; - drm_connector_attach_encoder(connector, encoder); =20 return connector; diff --git a/drivers/gpu/drm/msm/dp/dp_drm.h b/drivers/gpu/drm/msm/dp/dp_dr= m.h index 45e57ac25a4d..ae632fcc407c 100644 --- a/drivers/gpu/drm/msm/dp/dp_drm.h +++ b/drivers/gpu/drm/msm/dp/dp_drm.h @@ -19,10 +19,11 @@ struct msm_dp_bridge { =20 #define to_dp_bridge(x) container_of((x), struct msm_dp_bridge, bridge) =20 -struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, str= uct drm_encoder *encoder, - bool yuv_supported); +struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, + struct drm_encoder *encoder); int dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, - struct drm_encoder *encoder); + struct drm_encoder *encoder, + bool yuv_supported); =20 void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, struct drm_bridge_state *old_bridge_state); --=20 2.39.5 From nobody Tue Nov 26 08:53:24 2024 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 327771922D7 for ; Fri, 18 Oct 2024 21:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288174; cv=none; b=p7j7lQc9upPO2OzgiyxLuiSTl1sp52iksxQ6VU5NrC5Bhg7/SIvf1GWP1iuudVXjFmEFok8UPs1yJZav/ET21pxfnE0dLM1en5Uc+mdMj5oGyJKHf9gkRm81QsXsn9N8W67IoH6VDoD5MOFVDJt3wMKbyHrywR+kyEVDZ7MqX/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288174; c=relaxed/simple; bh=vSGIECGW576rwJsHdegRSgB/e6dJJG1yWk4yZ40815g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JUqv5rgOiW8PKbb+ZkykBdfSQsYLs9pKO2OiQ5xbJ+eydcQsPvQeBtYjKu6D3+BOcySH3X1VoijoqU/qipeT6BxdVYGZDl+cFDmoBpZsiW2sXVwOyBp2VTSjJ7H/ih2Sh3IDPoic/3RGO6RXn16Vs9nsIwKoZtoIWKuJFCG1DAI= 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=Yd/YXxuP; arc=none smtp.client-ip=209.85.167.41 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Yd/YXxuP" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-539f53973fdso2023285e87.1 for ; Fri, 18 Oct 2024 14:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729288170; x=1729892970; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=z3JlxuYLRvmuBAe/hXPotObPdIzfa3RGXwRrg41qHxk=; b=Yd/YXxuPOQ+3iEyOq4s/1Gm6SITS92wWoCmxx/5YUQWTfNdaD7tgYxZbxjkYhQ1BtO v5ZtT3rg6+uZ241s8+V7l/08z3A41jnoh+aCUQ5BkxswlYXRSwV4NvCOnCa08PEEEcA5 JYdigYoM3gNDl1Ezfml+omq02HSrwukr6y328YEmAKiF0yAZPwiYYn0Q+2KaJSERHJru W1kePEhZfzMVE2JX66CQzSodku2Bg1Vd/E0xp6cykgT8PcpPD+6IkztIJTO1Nxc9JLTP CdImUIlVd8f7nrHR0RkADmc0G9heLwS0K/1q1AFJOPOgde8uy8xlOSxuQCvRE0bkn8lX jk0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729288170; x=1729892970; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z3JlxuYLRvmuBAe/hXPotObPdIzfa3RGXwRrg41qHxk=; b=RcdB1R1LH9QBecv9ESnTcWfcySkXW9qhc7DkXJ54p6K61rME3RtXhTn67e0Bx7i8dw Evan+J/lilGllA5oOuDGEtb/qGTA0hsb76vUlpgWbDZBrLvT1Vz2ptZSN6rZiCrDJqk5 5VuSuF2VxZQWaRiJgbEPlXesMRnLxAABwshTUl0XmM6rgrvwJ4ISkBJdR7wfe/7wfbf9 bSxFzDbqRe0UKsO1pyf6Zbo87cQ99g+pVRtn/8tfkLlxclT1exvQ32N0DjBm5aNrolmS uxKmD9RGQ3PaYDiBGUPCEc4WW1+ymL6Caue+madH5LKRD82NnWCQALmXj4y1sH8H8k2e cLmg== X-Forwarded-Encrypted: i=1; AJvYcCWywpYTsOY6PhIOvrO4HA6CrSypM2+Bhy7RohhQFGtjqChvl4xXgCaIpuuiSVeS9vLtoFSjgVQQ6mdu4Co=@vger.kernel.org X-Gm-Message-State: AOJu0YwllvOC5V1PDXfReEVQ+cg+0tCkVPYojnH5OJMlUroRqI2nvGGo fS9K1RvXwL0ot0dRt/wIrqllAyvrdaspvn7+ve1Qb400pJGpFwXDOB2BP3wcl2o= X-Google-Smtp-Source: AGHT+IHnKKr9DRlmVgrVc32PqUJ1XzjQFynXLr6N7p9iMEp4ytq6PRLtyD5ZxAK9ZZhPA+gqE3INBw== X-Received: by 2002:a05:6512:3f12:b0:53a:41a:69bb with SMTP id 2adb3069b0e04-53a15b995c1mr1118216e87.28.1729288170302; Fri, 18 Oct 2024 14:49:30 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0ce5sm332088e87.181.2024.10.18.14.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 14:49:29 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 19 Oct 2024 00:49:17 +0300 Subject: [PATCH 6/6] drm/bridge: dw-hdmi: set bridge's ycbcr_420_allowed flag 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241019-bridge-yuv420-v1-6-d74efac9e4e6@linaro.org> References: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> In-Reply-To: <20241019-bridge-yuv420-v1-0-d74efac9e4e6@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Alexander Stein X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=956; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=vSGIECGW576rwJsHdegRSgB/e6dJJG1yWk4yZ40815g=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ7rQ9Xve2779/pDOty7EYZXSyS8qsUqzJ364anNd+p/J8 axaczmmTkZjFgZGLgZZMUUWn4KWqTGbksM+7JhaDzOIlQlkCgMXpwBMhFmQg6FNq7pWwjTa9/oz WwuPtULRWf7X2PdL+6+8e0tGRqG5R2r53MZrAjmrDb9tnWobqfHvwV3Gjhvqc1+sWT+x861LHd+ ClVqcwj7lJZ8V+eR8VjbqCh4IzX0iXf90n0Ivr3x7ofi3pofPvr6VXbVcKp+l5IJueQa/9oOCD9 /uXLlVfzNo6iaBwwUfrZI02pvOXz+e3v5v+673Idzia9prJ1QXdHxIK66sduHjulG9cU3ylzrLu /N3Wz6ezTMj0s9N6wTjufBcB/uDM28wl4l8ltwl0Jma+Tg03VzAeMLx7BwRhdf8QueFZ90Wu3Ar Pj41i/2RqZC/m+sz/wfVr58X+X18xFzvyvPm6M6g5aHlAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Set the drm_bridge's ycbcr_420_allowed flag if the YCbCr 420 output is supported by the hardware. Cc: Alexander Stein Signed-off-by: Dmitry Baryshkov Reviewed-by: Maxime Ripard Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/br= idge/synopsys/dw-hdmi.c index 0031f3c54882..996733ed2c00 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3503,6 +3503,9 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device = *pdev, hdmi->bridge.of_node =3D pdev->dev.of_node; hdmi->bridge.type =3D DRM_MODE_CONNECTOR_HDMIA; =20 + if (hdmi->version >=3D 0x200a) + hdmi->bridge.ycbcr_420_allowed =3D plat_data->ycbcr_420_allowed; + memset(&pdevinfo, 0, sizeof(pdevinfo)); pdevinfo.parent =3D dev; pdevinfo.id =3D PLATFORM_DEVID_AUTO; --=20 2.39.5