From patchwork Fri Oct 18 21:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842455 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 6651318D65C for ; Fri, 18 Oct 2024 21:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288165; cv=none; b=ci/ewQi0mgXBvung7A7o/hHXLbL2R3qDrKStw+MIKafRsswT9rFz1yIiTJpPY2tZg4EP3vaT2e+O9HX2PNkDiaEXefpKhApr5f+lbFJI3N1Vi8LMSScexvDYkhiJR/6OiHiQFNZbLMFrDy4Djia6nZJvjM2N4sjvn38TebCGlis= 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.54 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-f54.google.com with SMTP id 2adb3069b0e04-539f72c8fc1so3065997e87.1 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=ek55BkXIzRZlc4NZot1a8kfsVsZMzyx+8ngdtqNGsgI74x03kTfmoksRodXKqYlhnv wPNW8tTFI+CUj014JNrfLTt3bIKwAS7mSXRVSR4f15Iy6tMWtxwYT41Ct//F+dZktI9N abgEqLNVo0BHfb3f0RKodWrs+K5U26N9G0C8YmagKBxVu2ogJ7pL8V6m8acMCZ/+uaw8 deyFL0UDHdjw1/CvVsqRSl5oRXQiZrQicjGrhAW2lR8dUjBlZ+X24otwpMjFLsGx6ONZ D4jKEOeHG3ITOIOj/77q7zPnSRAeX5Z1zFK4RG899v4mFUbM59rYUE7NmwR2f04l/hxO /t9g== X-Forwarded-Encrypted: i=1; AJvYcCUtWHYMWMtt0C51WNRFEg37NFw0tBG+SL+zY215UJMbngIs+1egMY86EW4SrQofqVnGHKkYqFt8+nekne2C@vger.kernel.org X-Gm-Message-State: AOJu0YzBQZBA8uMotIDk5VbENwuMkYxB5s2I1ADmyt1hTxGuiSWvzGOR DhBI73IcWcouCDFb7TlxhlAvwZnOIYNVPf5NWC1+x9MEgtGGoJG66zBsZa1RPRg= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 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/drm/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(struct drm_device *drm, bridge_connector->encoder = encoder; /* - * TODO: Handle doublescan_allowed, stereo_allowed and - * ycbcr_420_allowed. + * TODO: Handle doublescan_allowed and stereo_allowed. */ connector = &bridge_connector->base; connector->interlace_allowed = true; + connector->ycbcr_420_allowed = true; /* * 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 = false; + if (!bridge->ycbcr_420_allowed) + connector->ycbcr_420_allowed = false; if (bridge->ops & DRM_BRIDGE_OP_EDID) bridge_connector->bridge_edid = 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, From patchwork Fri Oct 18 21:49:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842456 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 2B02118FC65 for ; Fri, 18 Oct 2024 21:49:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288167; cv=none; b=Vm0h6ReVM57n3XYQdLlJT/zjUeJpE4GzsHnBXxuBElE0MSKQLHNbUixZRA1yHW3JhlNsoTpokxFeEhKk6anrWz2khaqC/LjG5cG5Fjr1n5V0qNjsAmhRvc2GzX9rCJ0o5Dbf6MLmIgMyNL2W3g0762AoUCMKr2/Ndl7Csc1Eqqg= 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.48 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-f48.google.com with SMTP id 2adb3069b0e04-539e3f35268so569139e87.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=V1wc8Qabw6TiwPGVmLlu+BqTHojUIYc4omlizNSzzgrCmlc/YeZ3ing2wOvHL1oHWS R2jt+x0qGwLzNlnT5WYCL0+VGZts1LKWvgrH7H8gOKqv5UJwuvfuyjmJrItdlwEWyYQb gtm0a919EWmqybv8xDfh2WF+MIEyyUiVSZfBFx+kMbra846rJ5DBtXmiCJZd43RgsxcZ mnIRstcmmE43Batt/PSs1RGZYMgWL8eCGbwsUsitb9qCM6Ga61ULSVbPP1yyfn9UWtBa /OYLAihnPmYJz8dN1DIHrsGAmWyy/y8DrwHEZfrsXll0qfrJEO/WSA4ri68mnJqXeT+V FxbQ== X-Forwarded-Encrypted: i=1; AJvYcCXADm3HmL0EoLDVNOYXwWOA3oACvzrTAeAZqyVCmwEI2JMDjfdwTRl4BdoB4NNg6lP2Skao0Lc9/ty+D3t1@vger.kernel.org X-Gm-Message-State: AOJu0Yz4yKCWL4X42dfCV5ao3TxLwQf84J0aXkyTIqhdACUOr/Rbu5a+ SOSRe+yKqFg4w8hsLqpjmuG0FjmvmiOkoLvFS5suSt9qSRRqWnKRlasiTKxRMsQ= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 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 drm_printer *p, drm_printf(p, "connector[%u]: %s\n", connector->base.id, connector->name); drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)"); drm_printf(p, "\tself_refresh_aware=%d\n", state->self_refresh_aware); + drm_printf(p, "\tinterlace_allowed=%d\n", connector->interlace_allowed); + drm_printf(p, "\tycbcr_420_allowed=%d\n", connector->ycbcr_420_allowed); drm_printf(p, "\tmax_requested_bpc=%d\n", state->max_requested_bpc); drm_printf(p, "\tcolorspace=%s\n", drm_get_colorspace_name(state->colorspace)); From patchwork Fri Oct 18 21:49:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842457 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 83D51190685 for ; Fri, 18 Oct 2024 21:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288170; cv=none; b=bjK8Ymd2Vj1MZ3jxCBLZMxjrXagJJGRanRnp5+g/G9xogN4dNkJ/puY2s1d9h8KCAfYcZfbJZw3ZYQntgCydoL+YYVI/PfWBL4CptQ4iqSlqoj1kSaHM7mHkyex+Xgj2T93MviDk50BTnlrY012t+Fh9g76WqkeB2QiwuLGfDMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288170; 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=EAUUb+OJDZY9baRpyBfJ7YfQfFORbheQDApfAH1sFg8FjZhKcrkTKwiANpL6myTjarKkmpbSvlggOkAVHeb0YzvrPyubJwZJqwTNyyqmjUccOc5cV0KV9liceTzHk1a88T4nRchX5JzBhfo+G3hv99DCVj3nGk1CSaM0o6gMr7M= 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.177 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-f177.google.com with SMTP id 38308e7fff4ca-2fb50e84ec7so22638791fa.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=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=NEShzPJlUUdl0YWdLaT1jCp/LYWkit56ZJCTxMzj9maGvKrAxYbDeSGfY0XcPzy70r ZNpE2kxv+xn2mE/MCoF0+GUKMEAdjHT3sewVjGbAg9wzPmIyccSm8y0gQQuTL550Ky88 11/RfPTJJ5NhdNb2pQvZYOCppl19GUq+C/ZfXnNmmBxQ2yww5S+nXRkcpV98E3RzFnzl 6zrfCxlOWhv5ABW4RzHO+JDmkCcS49nwZTVM0Yat9yV5E0Rq2oKdTQZ5u9q2sQCZgQ7Q A7m+BP0fOGk5Uyjj2f7zaprSPX+xPbsN1DL0D2ditp2WEI+s659hi9xAG1p3XqJp7BJg U8sA== X-Forwarded-Encrypted: i=1; AJvYcCU28MNCgHcr57OwpsJZdY7AU99v+bhSdpQSj9c9sOGG6nCbDOAmb+6ObUgxnzxqcdXv6+3GQOvOG6C2snbu@vger.kernel.org X-Gm-Message-State: AOJu0YxHWQLk0xZSIrJhN3m/fQwzadQHZNCtGYVJVAuDCWxJZacKCVwj qd9sTSeIDXZJmw3ksiJiucY/w4ojMQiU3foNOAqSo6AvnwuAn2mhgCSQ3UY8dkA= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 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/bridge/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_device *pdev) /* All the supported connector types support interlaced modes. */ conn->bridge.interlace_allowed = true; + if (type == DRM_MODE_CONNECTOR_HDMIA || + type == DRM_MODE_CONNECTOR_DisplayPort) + conn->bridge.ycbcr_420_allowed = true; + /* Get the optional connector label. */ of_property_read_string(pdev->dev.of_node, "label", &label); From patchwork Fri Oct 18 21:49:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842458 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 463B81917DB for ; Fri, 18 Oct 2024 21:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288170; cv=none; b=jYfTCeaTg5ixbZD+1ZmJR4Uhdda2cJrrhsG4C6Is0EP0z2EwTu4IkT+RlSSv34k9wIQyu16KQzOS7kjI2VoZa+KwndO7qhddZJbUM2QVW36+pohDEfg017YHtrLwALyn2WsSCwlPEr1OOO9SVzrj8IFUUz5rVX1KufOhsmpe16I= 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.182 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-f182.google.com with SMTP id 38308e7fff4ca-2fabb837ddbso38139931fa.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=vJ+q+PbzmhSrKijOdwMyiTTE+bIgw5wxomBsB+8KvTN3fm8z0dKuOggv06NHn1LJz2 ih/pXIty9CqBcUDFgQugzaIu4hbZ5MRsmbSbBnT6hQkBJxK5aXfLDn6k44hKjmaHeQLJ iMLvRzDdmAL/LwD7J2hKPmYaGPWeuSyyFzxszRbkVLifTnCAdLnAJUhasdoyURKRbL1r vBEeMEa+XAa2H8SmEvaFkm0BvA6sn/4PwH+qALNjveLL9hB3OEBWsEmjvkbMntUTUOw1 kUdvlHANGmJUepgX3OH3tVSLDi8ZQSQiySziseSrdZvRS2nTGB0m0O55gXZKImR4f5mE z0bQ== X-Forwarded-Encrypted: i=1; AJvYcCVHGYYBskQyLitvUlI3d6+zd8WE0pxXF5uoBgmb+MQWDf4vtv0DglYUSJrVHqwijXyODxjvVkiOHWptoFHp@vger.kernel.org X-Gm-Message-State: AOJu0Yz3179Mrbl1lF/roNDIia3edQsSK6kMwCX5DSeDSoHJu4rfo7c/ SLqjOI/ZW9MhrxfdPgPLhXpFdTkr6hXq9R3CJCJbBZuDcFp0gVGXEu9v2swLBIE= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 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/aux-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_device *auxdev, data->bridge.funcs = &drm_aux_bridge_funcs; data->bridge.of_node = data->dev->of_node; + /* passthrough data, allow everything */ + data->bridge.interlace_allowed = true; + data->bridge.ycbcr_420_allowed = true; + return devm_drm_bridge_add(data->dev, &data->bridge); } diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/bridge/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_device *auxdev, data->bridge.ops = DRM_BRIDGE_OP_HPD; data->bridge.type = id->driver_data; + /* passthrough data, allow everything */ + data->bridge.interlace_allowed = true; + data->bridge.ycbcr_420_allowed = true; + auxiliary_set_drvdata(auxdev, data); return devm_drm_bridge_add(data->dev, &data->bridge); From patchwork Fri Oct 18 21:49:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842459 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 ADCD0191F86 for ; Fri, 18 Oct 2024 21:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288173; cv=none; b=Sukav7554Q9ZAivxH5yDOV8QBLvMwspHgotmQvM0p0C42ON7NAB9qJQkVuakymr7JSRP3XaiZh6vpNmsdUZUCxz8OtohBG0MxqtmyzAMUrCRPUGP/zS1CboMQYz8eSie+4phFoP1JToBFpeBG5f1isF/HoIIZT2Bz/bZZT2MnEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288173; c=relaxed/simple; bh=ugTosUslB7wYiUqpHQuS1lhI0s68LhvrkUMBV1pOZG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qFTSW1B96jB9d8VeY4gGnt3acM0DpAZ0CCQZg+IkNgLCIKeMKOvKJkNPlvYelfAyk6WEkL8n0UZaMsLpKfaQgLk4vOTYupWIdcH82PH+g4nJ0mOcRjHmM/loRwF8wHVkAeityJpg71V8nypVJs2TXTMy8ncIqNpMJCqcWE5+fns= 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.208.175 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-lj1-f175.google.com with SMTP id 38308e7fff4ca-2fb5638dd57so29824901fa.0 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=CKEMeAr0ZMK9uNpFpZ5g3LnWDiHAXUpCkoMDGez8idUj6Sd4JsfTG3C/ZBWQrw8WfW jNvNQZbiatDGGXcYz3sowLjLajjW1Atn6cSQzZvApZ/2RdNZovJcLn0jqf6qDDr4r6xP klVUyZ/0Jaqj3wO1Ds+pjdOU12rnr5/H9bofW8XX40xP0tcuJDqvVi92BmhAksK2gdJn VrJw/atiIpkD1h9AvNS3Ilt101QGI8IgwtTPdzNaDVwJzuxLz3yMgu/dtCwZCb3KOICU yagj4Lmj06KQ4nOV5Y+YNKCFbfJab8QWHeYeRfiDVMfBfxGQ5ues5wm8rU1t0KNnG9Ap mWfg== X-Forwarded-Encrypted: i=1; AJvYcCWh5nOSp6tVUQmXfrN9AfEBLfK2t0bN9cV0UZSbB/MeCwgY2FPQ5lRMOSJMpje6gsimbqDD9y9dc9Ogo2aa@vger.kernel.org X-Gm-Message-State: AOJu0YyABdiOd8kUloBRUfpO7FQahiuAp00022znvrlLgj16O4C+fmrd RFJqX7/LfM8fXU8LHV8XvWEk145hy0rEK1FOETNF7BxVe3AFy0B1Mt3iPjIhOKc= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Neil Armstrong Reviewed-by: Neil Armstrong Acked-by: Abhinav Kumar --- 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/dp_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, dp_priv = container_of(dp_display, struct dp_display_private, dp_display); - ret = dp_bridge_init(dp_display, dev, encoder); + ret = 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; } - dp_display->connector = dp_drm_connector_init(dp_display, encoder, yuv_supported); + dp_display->connector = dp_drm_connector_init(dp_display, encoder); if (IS_ERR(dp_display->connector)) { ret = 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_drm.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 = { }; 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 drm_device *dev, bridge = &dp_bridge->bridge; bridge->funcs = dp_display->is_edp ? &edp_bridge_ops : &dp_bridge_ops; bridge->type = dp_display->connector_type; + bridge->ycbcr_420_allowed = yuv_supported; /* * Many ops only make sense for DP. Why? @@ -351,8 +352,8 @@ int dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, } /* connector initialization */ -struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct 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 = NULL; @@ -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); - if (yuv_supported) - connector->ycbcr_420_allowed = true; - drm_connector_attach_encoder(connector, encoder); return connector; diff --git a/drivers/gpu/drm/msm/dp/dp_drm.h b/drivers/gpu/drm/msm/dp/dp_drm.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 { #define to_dp_bridge(x) container_of((x), struct msm_dp_bridge, bridge) -struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct 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); void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, struct drm_bridge_state *old_bridge_state); From patchwork Fri Oct 18 21:49:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842460 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 3272B1922D6 for ; Fri, 18 Oct 2024 21:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729288174; cv=none; b=jANhy6G43vaZOhKfHm6/JyIeX2scysD/zgyzvRQdNLxQ9XsbcQMiHMUIJtwiE8OaJMiZA8tc4Lo50KqsL4avdcDFFAiNz6qOYslS9zUYVEhYCjhjbL8RF7sVh+J7/zqGIThLGrn4BoTuS/FaindK8j4QSXddYER/EgVDByuaK3M= 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.208.176 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-lj1-f176.google.com with SMTP id 38308e7fff4ca-2fb470a8b27so31938571fa.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=cLBSS02/rgQByvA88C0CKY5BSrOQsWwWENPlTbJVFHq7FfpYUZZDFbsUY1dp8yO0C8 goMTZxlQFYBWkzMuEkr2w3TTvqBk6Fr8c6EmOd1Vo1mfTjmfvcLQ78xTAeQNx0k5fYEw X8aBynThzjl+s2/bncx397phbYfTT+uLV7ScJMdkpFY5E5QUumGU7QdCsJOvIiiHyUKq sYVTR1haUFTGt2pafn8ALOHJIAEkfdiVI9LMTbOg6ZJbxGqbzXmmdMUk0aaWnE+gvjCp T3CvRvrEpQwQJ6q2jRlrHu0JwwiJiFYFhlJ+qO3EVFD5gmNcErJlKoQVTmlNrJSpG2l2 1c5w== X-Forwarded-Encrypted: i=1; AJvYcCVu7GEsluRzxe2BgHYQeUBhMIzslBhUTWK8A+cLgJZ7ALqRfQClnORpx8i6Fetdw8ud87TcetiJfDAG8EEH@vger.kernel.org X-Gm-Message-State: AOJu0YwvsH0kCCDZpjBmKpGEmTv5HAoR9NgKYSOcVwFEXo3gC1dF5Gcs bW1zTB/lq+zwWmagBt5HJmsokSxQAL8PNM+PadE6tfyW8ymfPIpYSp+Xu3s8Flc= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 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/bridge/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 = pdev->dev.of_node; hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA; + if (hdmi->version >= 0x200a) + hdmi->bridge.ycbcr_420_allowed = plat_data->ycbcr_420_allowed; + memset(&pdevinfo, 0, sizeof(pdevinfo)); pdevinfo.parent = dev; pdevinfo.id = PLATFORM_DEVID_AUTO;