From patchwork Fri Apr 5 14:13:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786380 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 CCE8F16EBE8 for ; Fri, 5 Apr 2024 14:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326505; cv=none; b=Q3RTX80R/TR2iDLMYXW/5k0l+kfzzP7hR9eCjtwPMdX2WxBocVrepDmYLKyR5o/p1xvqIdDqCDDhlU9ESr4F6SWpqfg6P0Vs2I45Z2ZddBWgzv4vlREwAW4OasXtblvCtDJLM//8v/tjF2N+s2BQoaOyegGGLN3UGKBmEJ5oKgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326505; c=relaxed/simple; bh=5XRJmffCvoTFmT8VVV2m0fHxLKA4GHevMj3V5iq7Qd8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=nZ5VBsNDGi/b6yXXMDZAQikIWIcdoC52LG6JQeXt/Tk04QhrdmxTUVCkhLJeI78HxwXjO6ghH1U6V9NFJr2dRnoNhaF5lmXcUINL2OpVjR9WDGbR1OZIua1ZMTQkQKUnousNUzZfcN/nQaBJrH5GTNpBomFRRPL6F8KhjjDWaSE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NoHgHgf4; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NoHgHgf4" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4162501ba28so11537385e9.1 for ; Fri, 05 Apr 2024 07:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326502; x=1712931302; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=jnT4iGgtwWQMG15A5RV71jOjD3/1N8JXSjbIzrqMBWI=; b=NoHgHgf4dxBorDPnOm1HhYp+TU+A6W7awm1ERggt9ry6y4s34IZH6OJnurh1inBy7w p+9R2TMXipvSLut8Q+0OwJzVkzUj85XtT963Qw8FqjEMXw+NRGrj83bXd4sskoEj1vsm Dhx+bhuZVXscvcVLw00TAoQMNekqPrjlXQYOEpLiMyrML60gDD5zAMIFXhYtYKZjrTlu pjMWUQujFM3r13E1JaVYjVqOyAjRAaKQr5ny258C8eyplzfCUyMdKX0p2NlpyLM150YI tnjwH8wHsVBrGymsjNTmc96Ph+4qPQRX+FJE+ApkWwLuPyNOwc0Zdx4gosGVkY5aE5y5 Z09A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326502; x=1712931302; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=jnT4iGgtwWQMG15A5RV71jOjD3/1N8JXSjbIzrqMBWI=; b=Lb8g6WOJz/iKh3lgYF86lbX587ffSyTFm/194giWOhYByDB+E+Cp4Ovo8xIChn7aXP y2ghmzmL+cIm0PdQGYOwnlAn6GdSbTmE9mS866KCvBqa+MimqboLLYIc2xGvPBps5SkB fZj34SBbEHWMJQijPJqOav/vgViw3/eJrt102GHOMV9g/ei4iN0h9fC2+1IKpeHBvoxs w6VWRCYd1o5Nc/6gUE9SokxeqM7T+repHuNCKo5GmqwsgnWMqLKf5uf84+gZjzR3ZyuL kbu4kqeauh676ZFnTihjFpc0vOjzl4Mfh7zdV3TkU4r3JQp0JESp4lHXEuBnzhy7fEz7 gp9w== X-Gm-Message-State: AOJu0YyYYlS/o0dSgyyYiemVXsHJo2P92vYnZFs9rgcM4kchMyCRIaQD TB0E8L73sCQT96YX/711Wxm/Hs0AsQMQ9S8IpOrzbmHIOlxIUEwiR1F3XvhZeB4IWUS/ntsFxnU H4XQlZEjQ/A== X-Google-Smtp-Source: AGHT+IF7fT+tsywJe0mO2bG/yk2w9c89FveDuuUwn/6Zcv/Ube9lm7A2JE006Ic154bx2/3VtCB/27lzySO0ug== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:600c:470d:b0:416:3307:a047 with SMTP id v13-20020a05600c470d00b004163307a047mr17569wmo.2.1712326502095; Fri, 05 Apr 2024 07:15:02 -0700 (PDT) Date: Fri, 5 Apr 2024 14:13:56 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-2-panikiel@google.com> Subject: [PATCH 01/16] media: v4l2-subdev: Add pad versions of dv timing subdev calls From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Currently, subdev dv timing calls (i.e. g/s/query_dv_timings) are video ops without a pad argument. This is a problem if the subdevice can have different dv timings for each pad (e.g. a DisplayPort receiver with multiple virtual channels). To solve this, change these calls to include a pad argument, and put them into pad ops. Keep the old ones temporarily to make the switch easier. Signed-off-by: Paweł Anikiel --- drivers/media/v4l2-core/v4l2-subdev.c | 33 +++++++++++++++++++++++++++ include/media/v4l2-subdev.h | 14 ++++++++++++ 2 files changed, 47 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 4c6198c48dd6..07759cdd0844 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -369,6 +369,36 @@ static int call_set_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid) return check_edid(sd, edid) ? : sd->ops->pad->set_edid(sd, edid); } +static int call_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings) +{ + if (!timings) + return -EINVAL; + + return check_pad(sd, pad) ? : + sd->ops->pad->s_dv_timings(sd, pad, timings); +} + +static int call_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings) +{ + if (!timings) + return -EINVAL; + + return check_pad(sd, pad) ? : + sd->ops->pad->g_dv_timings(sd, pad, timings); +} + +static int call_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings) +{ + if (!timings) + return -EINVAL; + + return check_pad(sd, pad) ? : + sd->ops->pad->query_dv_timings(sd, pad, timings); +} + static int call_dv_timings_cap(struct v4l2_subdev *sd, struct v4l2_dv_timings_cap *cap) { @@ -487,6 +517,9 @@ static const struct v4l2_subdev_pad_ops v4l2_subdev_call_pad_wrappers = { .set_frame_interval = call_set_frame_interval, .get_edid = call_get_edid, .set_edid = call_set_edid, + .s_dv_timings = call_s_dv_timings, + .g_dv_timings = call_g_dv_timings, + .query_dv_timings = call_query_dv_timings, .dv_timings_cap = call_dv_timings_cap, .enum_dv_timings = call_enum_dv_timings, .get_frame_desc = call_get_frame_desc, diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a9e6b8146279..a5213411ef2b 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -791,6 +791,14 @@ struct v4l2_subdev_state { * * @set_edid: callback for VIDIOC_SUBDEV_S_EDID() ioctl handler code. * + * @s_dv_timings: Set custom dv timings in the sub device. This is used + * when sub device is capable of setting detailed timing information + * in the hardware to generate/detect the video signal. + * + * @g_dv_timings: Get custom dv timings in the sub device. + * + * @query_dv_timings: callback for VIDIOC_QUERY_DV_TIMINGS() ioctl handler code. + * * @dv_timings_cap: callback for VIDIOC_SUBDEV_DV_TIMINGS_CAP() ioctl handler * code. * @@ -864,6 +872,12 @@ struct v4l2_subdev_pad_ops { struct v4l2_subdev_frame_interval *interval); int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid); + int (*s_dv_timings)(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings); + int (*g_dv_timings)(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings); + int (*query_dv_timings)(struct v4l2_subdev *sd, unsigned int pad, + struct v4l2_dv_timings *timings); int (*dv_timings_cap)(struct v4l2_subdev *sd, struct v4l2_dv_timings_cap *cap); int (*enum_dv_timings)(struct v4l2_subdev *sd, From patchwork Fri Apr 5 14:13:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786640 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 0488B16EC1B for ; Fri, 5 Apr 2024 14:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326507; cv=none; b=Z9QX/XJqKGHrPnLcrsX69CvGtSoZEtrQhwXyNrN8FiNWbEpkEOQ6ge7TFblXxdWURhoR3B4G7YNN4mI+jDeBFizbyE+XIWQrsUwiJKNnhsQyn/OkEm2yo6d0+JoGYsu9RMqmIGikjD5T2WqPWafLewVU/TL5bd2jrshZlpt9S10= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326507; c=relaxed/simple; bh=6EehccEvTPWYOq7+XxW7U39Z7ElCZmB+5qet67lPQQs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Mhav7C/nyF21LTTjWzyygF7bRyELOzB3vvI5As4FCJxYvrtke1pqCyhHwn7O+n1EWeThAhu/Uih+qKoYWmeo3wh6CMyHhffqeDOJzru9oMvifnIVlODgmmV52nvXSA3kupix5DRPBchQgH1x0mypcHrYZBj5orVPvjZ/2V41+kE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=r5l6/Ip/; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="r5l6/Ip/" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-343d7cd8f46so579485f8f.2 for ; Fri, 05 Apr 2024 07:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326504; x=1712931304; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=EB1OqCeM+zzEWfmV9H/3BRd83N3O3aUGhb7gLO7v4Gs=; b=r5l6/Ip/rFUB8dW3ahq9kAitPKmB9Lngsi3ub2sxepQil40+4ROeQkPAvQUAWFsgc7 xfoIezE6JCZf0nD0tTKsr9FE45OVKMVrhqf8oRuZalW7p9cqKECi7SCf4r7kMhhk8PV9 VtZ4vBAVwJ+TSwkOejCwdapx0zwPQulR1jxfEsZBN3dv9HHPZDEYMbfnOBVLak/cs64X 6AFdmUBQRJc2rQvdeWkjbNOXH8VZhBpTs3e2QI1XiCvBmj2zzUk/vpvXc2CTtASlaGyj 0X/Sbeaud4Q3qWHRDdxmj/+HF6J+DOfqAjBL6IZnhhImCMxKfsirjt/VC9J+dVQyqDmL 0mZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326504; x=1712931304; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=EB1OqCeM+zzEWfmV9H/3BRd83N3O3aUGhb7gLO7v4Gs=; b=bZDXm2jtW43Jy09FLyZrs0oKuq3Of1rZywkDyzQl+U4qgQpZ1f+HAtwrH9xzjRk5AL E30G9BU4hvJDtTPAKa1Rw74zjYG/NBUMlo2PWLBeWNHOxpSVX+ZRSaxahlPqrrKMdGWv AP0+DyCoXcQ4bGGX1oHD5uL51NDENgKR5d7tyTHRRBJmzWPDKqfK0bdxaXmdMY4TJCf5 ZHLVN2hRIkacKDWvBLfrMdgEu1kzvRfSy2fs1/aa7ll0nhg9ATgTKo2iSmTmzTMqzBMl j+N+yk+atr1dmj2PWBznqHzOkQxUk4zHIIogGS73zqVxlyAV/SmGcRJVU75F/l+UW3QC +htg== X-Gm-Message-State: AOJu0Yyu0nG0fFBB9vnIzJHL7Msdbd52b4TU3pMctqJQJuXI7z//IIJ3 CMVSDEt6nzKrhYg97Oy1aQXYmZUXAI+L6EcC4QzuZnugmoMBx83BGOFvF3lapxckBQoHI1eMbiI dBGJRHUijeg== X-Google-Smtp-Source: AGHT+IHxUh/sNELzePmUjUKXOONpTWRH6C10MHQYsitlB4/bEok8pDIcPZmqe/e/AmmgnCRzPUYVo9trVTS96A== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6000:1d9c:b0:343:ce9e:3732 with SMTP id bk28-20020a0560001d9c00b00343ce9e3732mr2847wrb.11.1712326504331; Fri, 05 Apr 2024 07:15:04 -0700 (PDT) Date: Fri, 5 Apr 2024 14:13:57 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-3-panikiel@google.com> Subject: [PATCH 02/16] media: i2c: adv748x: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/adv748x/adv748x-hdmi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c index ec151dc69c23..a4db9bae5f79 100644 --- a/drivers/media/i2c/adv748x/adv748x-hdmi.c +++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c @@ -214,7 +214,7 @@ static int adv748x_hdmi_set_video_timings(struct adv748x_state *state, * v4l2_subdev_video_ops */ -static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd, +static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd); @@ -254,7 +254,7 @@ static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd, return ret; } -static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd, +static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd); @@ -269,7 +269,7 @@ static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd, +static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd); @@ -392,9 +392,6 @@ static int adv748x_hdmi_g_pixelaspect(struct v4l2_subdev *sd, } static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = { - .s_dv_timings = adv748x_hdmi_s_dv_timings, - .g_dv_timings = adv748x_hdmi_g_dv_timings, - .query_dv_timings = adv748x_hdmi_query_dv_timings, .g_input_status = adv748x_hdmi_g_input_status, .s_stream = adv748x_hdmi_s_stream, .g_pixelaspect = adv748x_hdmi_g_pixelaspect, @@ -413,7 +410,7 @@ static int adv748x_hdmi_propagate_pixelrate(struct adv748x_hdmi *hdmi) if (!tx) return -ENOLINK; - adv748x_hdmi_query_dv_timings(&hdmi->sd, &timings); + adv748x_hdmi_query_dv_timings(&hdmi->sd, 0, &timings); return adv748x_csi2_set_pixelrate(tx, timings.bt.pixelclock); } @@ -610,6 +607,9 @@ static const struct v4l2_subdev_pad_ops adv748x_pad_ops_hdmi = { .get_fmt = adv748x_hdmi_get_format, .get_edid = adv748x_hdmi_get_edid, .set_edid = adv748x_hdmi_set_edid, + .s_dv_timings = adv748x_hdmi_s_dv_timings, + .g_dv_timings = adv748x_hdmi_g_dv_timings, + .query_dv_timings = adv748x_hdmi_query_dv_timings, .dv_timings_cap = adv748x_hdmi_dv_timings_cap, .enum_dv_timings = adv748x_hdmi_enum_dv_timings, }; @@ -734,7 +734,7 @@ int adv748x_hdmi_init(struct adv748x_hdmi *hdmi) struct v4l2_dv_timings cea1280x720 = V4L2_DV_BT_CEA_1280X720P30; int ret; - adv748x_hdmi_s_dv_timings(&hdmi->sd, &cea1280x720); + adv748x_hdmi_s_dv_timings(&hdmi->sd, 0, &cea1280x720); /* Initialise a default 16:9 aspect ratio */ hdmi->aspect_ratio.numerator = 16; From patchwork Fri Apr 5 14:13:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786379 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 85C7716F0CC for ; Fri, 5 Apr 2024 14:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326509; cv=none; b=rO3BsvrJV/MFqYX2OtnsHjpPou9dtWiFX2QOeTwS7/tWrJ0aD4oFaq2LuBpAyJMUkwBwASx3NPiVjSVzeEjJc/uPgRlHvKPmnPy6WSy7aPQPMJmbNY/B8I1rEGB2tbnV9yB5FAioSg+KInf8U+ysGSAqc3AqxjZbiMETTMBlyno= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326509; c=relaxed/simple; bh=iylO9QdIY6acvXIk57+sD8IMYliPnmH08v8DfuMIWpw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LxYmhLbH+1mSAJmCzdEKCjo/AVfa/jI6CAf/yCK0PTlafOdAIuGVHW1nt0B78YnvCCGQowmrcFSPOYCS8a8+xnXaSZbI8cH9haZ/dai+UGbHMidxVvMT3+9iY7AmjZ0KZgi2thDqOQjfGy+0tFDYN3mBb06vEhDj6OATxeGCiCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Cvaz3ecz; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Cvaz3ecz" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcbfe1a42a4so3759830276.2 for ; Fri, 05 Apr 2024 07:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326506; x=1712931306; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=G/Y7QBSs5jxIOwBWz8/SWyYZH9f8APjHhQAUen0aR5o=; b=Cvaz3ecztK7QiHLYudSp4uip7Nc6m5FTdgW1nGERFl1sSnImCnMFBhZWdyFl2oyWnk +KppcYTs19XDsvzeT9EVkguEiurx51Ax7V5QmNe7wKvq+P1DYMSRjOfC6Y504EFb5UJx zvHX238iiZZVM5EGzH7XckfQjk2ezOhfezVmCSiTo6veLlUb0SblOIvcIrJwolrCBOcp w26Bz0GiTPvje5f3RTPjrdk2m90f6zZ6jkjpG64inrQjAgGRNhPXHG9sGD3VgJWo3JFR QYiUK+91WgLHvVSM1YyBVQ93GM+EWWmVJm572Lie+rmsfPJakwwdoeJwfuGq0quDE5yc tm0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326506; x=1712931306; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=G/Y7QBSs5jxIOwBWz8/SWyYZH9f8APjHhQAUen0aR5o=; b=QiAtJhUUqbLqySsFtmc1jhAaWMzrb5R1qJn2GUXxomYIAomda2h9ImVtC1F8JtwxOG XtOATGqx03peA9iuPjLyB5Th/nVwbF945lI50r8qNW+/pcMfsweeOUZC0e0Qe98Yl9ji DxAvK4Q+gLT6ZwOyds7cwNt7CRrSBhTZvmt3pvd+B11ge6ZKwdU01lux//2BiFimdqZq VTstk95H20e97g7Kyu6JKkvoWTuym4q9QePww4XjmOAarx8sOyVC5J/l5AceiONTd7iS XZPz4QBNE0MLSdb0dohkWsz2HH2wXLJuG0kmYgP52qEj8TW3yaG0luZRdYv/gGeB/6qV D51A== X-Gm-Message-State: AOJu0YyQfnNvze94unyuvcL8zs/M0QlOdjCpkW3hpco+W+Wf4OwGSZ5c KGO2S4gmC3BvTKmnJPTPw3wpvIjh1HpY3NLXuSPT8RUpo93IXWrrL2/xS+Ciug6lCsN+qgxdhOE 4E2Sno5A5Fg== X-Google-Smtp-Source: AGHT+IFl16zX1rOrdVwa2sMyYfgvPB9BWMtRkPdr6CNPVhFQBRvPklQwYD9v0qOkBRPDEwYWoreVm7kZ3ErTug== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:100b:b0:dcc:6065:2b3d with SMTP id w11-20020a056902100b00b00dcc60652b3dmr393635ybt.8.1712326506516; Fri, 05 Apr 2024 07:15:06 -0700 (PDT) Date: Fri, 5 Apr 2024 14:13:58 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-4-panikiel@google.com> Subject: [PATCH 03/16] media: i2c: adv7511: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/adv7511-v4l2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c index 0f780eb6ef63..00fbe411429a 100644 --- a/drivers/media/i2c/adv7511-v4l2.c +++ b/drivers/media/i2c/adv7511-v4l2.c @@ -995,7 +995,7 @@ static int adv7511_s_stream(struct v4l2_subdev *sd, int enable) return 0; } -static int adv7511_s_dv_timings(struct v4l2_subdev *sd, +static int adv7511_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv7511_state *state = get_adv7511_state(sd); @@ -1004,6 +1004,9 @@ static int adv7511_s_dv_timings(struct v4l2_subdev *sd, v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + /* quick sanity check */ if (!v4l2_valid_dv_timings(timings, &adv7511_timings_cap, NULL, NULL)) return -EINVAL; @@ -1042,13 +1045,16 @@ static int adv7511_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv7511_g_dv_timings(struct v4l2_subdev *sd, +static int adv7511_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv7511_state *state = get_adv7511_state(sd); v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + if (!timings) return -EINVAL; @@ -1078,8 +1084,6 @@ static int adv7511_dv_timings_cap(struct v4l2_subdev *sd, static const struct v4l2_subdev_video_ops adv7511_video_ops = { .s_stream = adv7511_s_stream, - .s_dv_timings = adv7511_s_dv_timings, - .g_dv_timings = adv7511_g_dv_timings, }; /* ------------------------------ AUDIO OPS ------------------------------ */ @@ -1403,6 +1407,8 @@ static const struct v4l2_subdev_pad_ops adv7511_pad_ops = { .enum_mbus_code = adv7511_enum_mbus_code, .get_fmt = adv7511_get_fmt, .set_fmt = adv7511_set_fmt, + .s_dv_timings = adv7511_s_dv_timings, + .g_dv_timings = adv7511_g_dv_timings, .enum_dv_timings = adv7511_enum_dv_timings, .dv_timings_cap = adv7511_dv_timings_cap, }; From patchwork Fri Apr 5 14:13:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786639 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 AA20616F0F6 for ; Fri, 5 Apr 2024 14:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326511; cv=none; b=mcueNhlZeKmZ75cCo5KbHmV2MEjHMZ8adrzipPp0k4VmGAIHZnNfjEg9mYVqcsJOrwTfx/OcZMvbJQFTveG3VorUZ7iL6DswXEreGuelGeUZONB5iKYosQuypq3FEyR1ZzgXbCI5nVfwSTcHi3NyZwyCA+lXVAIuuu6576hojdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326511; c=relaxed/simple; bh=idYrd+JwFJEmpLa5TUjmluycyXqG6/ydzEQ0w5bLKts=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Y8U0S/xlrZ84zLVDP54AnmGwCJPl42h1dZfJObW1RpzZ0NCxpqCZ4WSkl9AMfRMwTOAY2RXQwSbiJyKP4hOY0VbkFCwilwgVeYqe2a7AwHsc56vP/9UbHBfJE/lAvjytV0eMvMTlSHH3DMQTsIputcwGMK9tq2bdGwIuTnP+Ub4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EiBJ9d/x; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EiBJ9d/x" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcc0bcf9256so2908520276.3 for ; Fri, 05 Apr 2024 07:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326508; x=1712931308; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=JdSgusrl9te1mUbflA4RpHsrzTFXpOMOzAPL8Ip4ilw=; b=EiBJ9d/x/t09F9LMVgs6z4RGVViUk67UgdWAXJe+kD3UBIIgdX5etzfNa8AHsB8CFH 0TzCq9rk8L5pJkaW9x4lUNDpVfmW8v3jKjuEcJ8M5HOXArjP1KqxssqzVWzF/Zfakj1a 6YGNZgC5B6X1IdH5gn3Xk1YH3ai5NM2/BHKU5boNvx2eBZ0rsOkGcmGdwD71kq44g3XL PrCTexR4gVIVt/Lnwe4hgsM3fh+9J8QFdyUeuesGzGFEDteEUL3R3aZXktjiXojLXD30 lHc+QgQZtCRaGb0kqE/+Ff1ZPBjtfBRnIgDUDByYBWIeG1V5LSUM9ubdCjooYRJbDfmp MbIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326508; x=1712931308; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=JdSgusrl9te1mUbflA4RpHsrzTFXpOMOzAPL8Ip4ilw=; b=YD/4XJcDoQIdqZqhxbcmtg3xDpgVukjy/mUgsbVVYoUelTNz6RbVEA/949SmlE41iY zS5kiWBlcTG08s6wVdKEqBnYVf6t3MCMcQzIaR4T9isJ/4glqecb5n9xoKnJEJTVRM+U Dp9tS5xkAb8zy/ZGX2LiU3yUyeC6GWgOMbkXUPnKJDpJ3uG+0iMevgvgr4R8RlsUc+2E QdishjQLzcPd0c8zNvTB0JWwpzVjZurm6dM6nS3gk+taf7BRl+029zuv2OiFxsm/GyGb 6BfV+kZuMumLGK1CdUrhN1KyCbbPiAg92Q/i3Rv+KT4kZegFVT6QxjjmSi4N+6L/ZIlR S4Rw== X-Gm-Message-State: AOJu0YxSFWogghL7ZKSqObtVRd6VICGqB0i37B17EVYsNhjvBsg+U7Cm uAg5EIsuRj294TedyEwvvG7lHEhvuyptPQVHlaxSUwx/nOsydoETSQjGMrOnRwkdva8qyrqldXm qQsWob2DyWA== X-Google-Smtp-Source: AGHT+IEaUHqRZ1t/645SPuoM0Mq1wtBDlBAVyUzDU3uFVn4lz8fochNj8syLSt9Fpo1fHuDprzN3KNVBj/p5rA== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:100a:b0:dc6:c94e:fb85 with SMTP id w10-20020a056902100a00b00dc6c94efb85mr71969ybt.2.1712326508757; Fri, 05 Apr 2024 07:15:08 -0700 (PDT) Date: Fri, 5 Apr 2024 14:13:59 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-5-panikiel@google.com> Subject: [PATCH 04/16] media: i2c: adv7604: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/adv7604.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 319db3e847c4..404ccc9b42f0 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -1557,7 +1557,7 @@ static unsigned int adv76xx_read_hdmi_pixelclock(struct v4l2_subdev *sd) return freq; } -static int adv76xx_query_dv_timings(struct v4l2_subdev *sd, +static int adv76xx_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv76xx_state *state = to_state(sd); @@ -1687,7 +1687,7 @@ static int adv76xx_query_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv76xx_s_dv_timings(struct v4l2_subdev *sd, +static int adv76xx_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv76xx_state *state = to_state(sd); @@ -1730,7 +1730,7 @@ static int adv76xx_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv76xx_g_dv_timings(struct v4l2_subdev *sd, +static int adv76xx_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv76xx_state *state = to_state(sd); @@ -2607,7 +2607,7 @@ static int adv76xx_log_status(struct v4l2_subdev *sd) stdi.lcf, stdi.bl, stdi.lcvs, stdi.interlaced ? "interlaced" : "progressive", stdi.hs_pol, stdi.vs_pol); - if (adv76xx_query_dv_timings(sd, &timings)) + if (adv76xx_query_dv_timings(sd, 0, &timings)) v4l2_info(sd, "No video detected\n"); else v4l2_print_dv_timings(sd->name, "Detected format: ", @@ -2726,9 +2726,6 @@ static const struct v4l2_subdev_core_ops adv76xx_core_ops = { static const struct v4l2_subdev_video_ops adv76xx_video_ops = { .s_routing = adv76xx_s_routing, .g_input_status = adv76xx_g_input_status, - .s_dv_timings = adv76xx_s_dv_timings, - .g_dv_timings = adv76xx_g_dv_timings, - .query_dv_timings = adv76xx_query_dv_timings, }; static const struct v4l2_subdev_pad_ops adv76xx_pad_ops = { @@ -2738,6 +2735,9 @@ static const struct v4l2_subdev_pad_ops adv76xx_pad_ops = { .set_fmt = adv76xx_set_format, .get_edid = adv76xx_get_edid, .set_edid = adv76xx_set_edid, + .s_dv_timings = adv76xx_s_dv_timings, + .g_dv_timings = adv76xx_g_dv_timings, + .query_dv_timings = adv76xx_query_dv_timings, .dv_timings_cap = adv76xx_dv_timings_cap, .enum_dv_timings = adv76xx_enum_dv_timings, }; From patchwork Fri Apr 5 14:14:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786378 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 8391F16F291 for ; Fri, 5 Apr 2024 14:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326515; cv=none; b=BX4MdIy+zbbAo4dzdp/MmM8JdPk25B+s/h4jxM9/IFVzTPNx7OTJmJt627rVfFw2HBUbg32XHUGGqCjRIaEXE+FkCk5//vKmuAVfOBa3NGi7WmGiEiY5gUJ8hQ5q7HG6PecRh6DVE2zTb/YcUjs8MVwDmc5WuVLQmwQK1vXX5j4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326515; c=relaxed/simple; bh=8aQ18Uj04YT2A+P3Oh2IhoxHUDUc0ZferNgCl6q/rqY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dU9vqmUrKNLKlW4p/fHLYQlpApZGcXgHyKxcPdikLsuJp9A4g8eWdDh7o020D2ldaoE4WiuTOpJUQuTqHMEwMU+W5FF9YS1h5ftooxftZerPsSe8QB8XQTIgOelHXk32mZJXCVN6X82QN1HDS/aKooaAMD6e8j/biNRvTNrZVQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ajyTNn22; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ajyTNn22" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-343e46df264so377702f8f.1 for ; Fri, 05 Apr 2024 07:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326511; x=1712931311; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=My1wqn+atygHUN+jmKPzc06Fma5b+VEUv6s9yO8/Vks=; b=ajyTNn22yOMMVgwV2TyOxLo8XPjO/AleimyLqn3iEdvfaTrxp0IyjoFvhRbsmb7/Nq suiKWC4KGMWKgo+xmYdEol4ylR9gHLsYFATSbL8pIOgj3yh9KD3LNpEM33p6n8aDRQsA JpORTSKPYPySYOOTHcf0BsMWC6S/RUhQtgpCWVXGeegd7YWIG/WAZCoHrxx1gYEli50l GUFTsbssCb9Ef08p8BrdTlB6sI+ljnFgzTVIHDLGzPPLJDISeEkk2mjt4lhi/a0YtfPg a5FXNsEj5OpTVtVoUXm1IvU1J+QJ4t4pBjylUOJdO6+iKfv68rOCMbZSOV3BG/37S/YS NUZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326511; x=1712931311; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=My1wqn+atygHUN+jmKPzc06Fma5b+VEUv6s9yO8/Vks=; b=oCAyh24c0ZPFtXZfUY1OorHDJiZCY8qqjCtyJIq4v09D9mo6MbTbncswwLzSqV0QMb kVUZCjetV3Z/5d9TkaaHbopLbFKTysKnT7ovynj3SJROz8Y5AqALnyp9+27KCNQhEWAR P0JteSUf90IdEUuTkEmK5rgl1onEvHg0GBS70QYeXRxjjAW52hO9LZE+trjfY5TDDo7N DIZMpW01xruU4VW6Ptu5CtBSSZA5vJEG5qnAJOdKRse9t6G8vtnNPfSjD9gb5y+tf/Zo Obmrt/U6XqXIkQr78NdZ+l43SC8egu010fbKscUq0Z2lTLgPaq8QZ5m8r7TYcEYPwfNX iTTQ== X-Gm-Message-State: AOJu0YwvDMUIRW+KEsTA7b0R1otbXv/sV+GZcfOXoPHPug1LikbNu/7j YAoCqMJj5UMmgge5Q6cG1dY6XyRuSwA4HAa+Ysbesn772rygMkcM2eyf3FuYfiUwVWtjp5s5V+y vLxVcRmGdow== X-Google-Smtp-Source: AGHT+IEdrMjCWzhSnkncvw6N1O1UZ1VCF1PMUEfzJPCR3jpkvdvdrcU6A9BajfE3olsmjFosqv9KN+QUA9LFZA== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a5d:5a98:0:b0:343:2ec2:e4e8 with SMTP id bp24-20020a5d5a98000000b003432ec2e4e8mr4389wrb.3.1712326511044; Fri, 05 Apr 2024 07:15:11 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:00 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-6-panikiel@google.com> Subject: [PATCH 05/16] media: i2c: adv7842: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/adv7842.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 2ad0f9f5503d..f2d4217310e7 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -1518,7 +1518,7 @@ static void adv7842_fill_optional_dv_timings_fields(struct v4l2_subdev *sd, timings->bt.flags |= V4L2_DV_FL_CAN_DETECT_REDUCED_FPS; } -static int adv7842_query_dv_timings(struct v4l2_subdev *sd, +static int adv7842_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv7842_state *state = to_state(sd); @@ -1527,6 +1527,9 @@ static int adv7842_query_dv_timings(struct v4l2_subdev *sd, v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + memset(timings, 0, sizeof(struct v4l2_dv_timings)); /* SDP block */ @@ -1643,7 +1646,7 @@ static int adv7842_query_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv7842_s_dv_timings(struct v4l2_subdev *sd, +static int adv7842_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv7842_state *state = to_state(sd); @@ -1652,6 +1655,9 @@ static int adv7842_s_dv_timings(struct v4l2_subdev *sd, v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + if (state->mode == ADV7842_MODE_SDP) return -ENODATA; @@ -1689,11 +1695,14 @@ static int adv7842_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int adv7842_g_dv_timings(struct v4l2_subdev *sd, +static int adv7842_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct adv7842_state *state = to_state(sd); + if (pad != 0) + return -EINVAL; + if (state->mode == ADV7842_MODE_SDP) return -ENODATA; *timings = state->timings; @@ -2780,7 +2789,7 @@ static int adv7842_cp_log_status(struct v4l2_subdev *sd) "interlaced" : "progressive", hs_pol, vs_pol); } - if (adv7842_query_dv_timings(sd, &timings)) + if (adv7842_query_dv_timings(sd, 0, &timings)) v4l2_info(sd, "No video detected\n"); else v4l2_print_dv_timings(sd->name, "Detected format: ", @@ -3226,7 +3235,7 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd) memset(&state->timings, 0, sizeof(struct v4l2_dv_timings)); - adv7842_s_dv_timings(sd, &timings); + adv7842_s_dv_timings(sd, 0, &timings); return ret; } @@ -3298,9 +3307,6 @@ static const struct v4l2_subdev_video_ops adv7842_video_ops = { .s_routing = adv7842_s_routing, .querystd = adv7842_querystd, .g_input_status = adv7842_g_input_status, - .s_dv_timings = adv7842_s_dv_timings, - .g_dv_timings = adv7842_g_dv_timings, - .query_dv_timings = adv7842_query_dv_timings, }; static const struct v4l2_subdev_pad_ops adv7842_pad_ops = { @@ -3309,6 +3315,9 @@ static const struct v4l2_subdev_pad_ops adv7842_pad_ops = { .set_fmt = adv7842_set_format, .get_edid = adv7842_get_edid, .set_edid = adv7842_set_edid, + .s_dv_timings = adv7842_s_dv_timings, + .g_dv_timings = adv7842_g_dv_timings, + .query_dv_timings = adv7842_query_dv_timings, .enum_dv_timings = adv7842_enum_dv_timings, .dv_timings_cap = adv7842_dv_timings_cap, }; From patchwork Fri Apr 5 14:14:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786638 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 3C05E16F29A for ; Fri, 5 Apr 2024 14:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326515; cv=none; b=PUY34/RtDYnPQU+GoWUEc+C12hx80SoB7ANHW6bu853hckB+L1/B7yDKt86HOhR+vSgdaM1q+hk7BYXgH8Xs6HDwNWFLsqQneqmYw6SoYuifwN5qnS6OFMLXTUevLs48WPk/9ZJpGbXPuM9gMaV4ogpG8Ii1UNOJCjtcMHs3vhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326515; c=relaxed/simple; bh=4wtNik17CJrGwo09hGU5FCupPfVKAQ7aXZ/lboHZCY8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EzDvuWptTAQEO5GJMLXobZzxaH2q/0CUtm1dJGpf2nYhxwh39AXsjvbQI1Qq5ypzclaCXeHolxiA9HjErNrPBmHr9mIBfdvwpdlm5rafK9jfg3JCL+7oblCYjMuCGjsSmsta11kPo0/vxv3eJ49de235aDSVbRLC2gKaVuNu2V0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=IIPYXxXj; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IIPYXxXj" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc6ceade361so3774129276.0 for ; Fri, 05 Apr 2024 07:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326513; x=1712931313; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=Elc5l/UMF2FSTb8MiWLeLSVgKSF7YacOuvj79p+V2jg=; b=IIPYXxXjaykjQPMrEzLPVJmy22WhyOCQUXPZunT/nLENBxuS5nqVuKtMmtqaYtgH/p kYQex1NfKKuJaw5tR8WGbOdKsMWCtX/HY8R8GTaL7AGjuZyVsgVf6UaXzdOm8KrXf7ux RRJOdJ8V0N7CBAXc8rn9WVt9Pllu9Cch2HjVra8aLvu2eCph4gXjwac/NQ9uhwlXhr8X POrnxTbtIhZCPm9pmFoQlTS6Wf4n+7Pe9knhhftfSM8fLFPjj8rkuMJ2maFS/Zt7qcDq 1AzHpsKxEBEncvyoLl78wqCaDzKz9UdPoOBXY2Fkbd9644jSh5CYh0MoPCPNP676zRLE afFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326513; x=1712931313; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Elc5l/UMF2FSTb8MiWLeLSVgKSF7YacOuvj79p+V2jg=; b=LGnO2Eo3etQE3ASPa0JLM3/uvdaNnrKcpws9L9gdlQzu6vtmt7juNPPIkRK2VX/Rxc O0cvRcTvPCVxpflAvWMICh4rrnM8H/Babilsa6a467gWDMYbNi5Wa8pDoX9QoQPTpZmh ZIQ72IDZwosecBRBZPlHm6SOb+e3fCNCpwbliMrEQAAwwN0BsETccd4LTfotIXeY1jSa uHQhIxV/IHEdTRGwkfkruXppgfYHjN6vc7LUXW3HNP4uyrRhxUonVoZsQPYYH26V/Byo jw6SESVvi9myaCsbozPy5atBFjYDrm+/yxeIr15ITdZD4z72xSDaT6Pf0swOxDsNLqB7 6v6w== X-Gm-Message-State: AOJu0YwFF6Z+XnN1Bk3ap3MSILbqqJ9HFA269a7tF3JrPi94bSyhY6Rz OxKBBUf4IJ2I9A5WwFE1h5mYPcNuRwmefoQCbHnrTnmqTR+6atQbAiPJEmqistQOWZFc3/4kvoc uVBQeRfM10w== X-Google-Smtp-Source: AGHT+IHNeI5HSh0A3wDhTGZD/QoxygxfQJND3EBhOMUo7WjeYvOYmOryZPypoQlS0NMtGL+mlRC1y7EXBD6Fnw== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:1108:b0:dc7:68b5:4f21 with SMTP id o8-20020a056902110800b00dc768b54f21mr374791ybu.9.1712326513206; Fri, 05 Apr 2024 07:15:13 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:01 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-7-panikiel@google.com> Subject: [PATCH 06/16] media: i2c: tc358743: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/tc358743.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 3192a334aaab..303c1d06c8b5 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1521,11 +1521,14 @@ static int tc358743_g_input_status(struct v4l2_subdev *sd, u32 *status) return 0; } -static int tc358743_s_dv_timings(struct v4l2_subdev *sd, +static int tc358743_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct tc358743_state *state = to_state(sd); + if (pad != 0) + return -EINVAL; + if (!timings) return -EINVAL; @@ -1553,11 +1556,14 @@ static int tc358743_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int tc358743_g_dv_timings(struct v4l2_subdev *sd, +static int tc358743_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct tc358743_state *state = to_state(sd); + if (pad != 0) + return -EINVAL; + *timings = state->timings; return 0; @@ -1573,11 +1579,14 @@ static int tc358743_enum_dv_timings(struct v4l2_subdev *sd, &tc358743_timings_cap, NULL, NULL); } -static int tc358743_query_dv_timings(struct v4l2_subdev *sd, +static int tc358743_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { int ret; + if (pad != 0) + return -EINVAL; + ret = tc358743_get_detected_timings(sd, timings); if (ret) return ret; @@ -1822,9 +1831,6 @@ static const struct v4l2_subdev_core_ops tc358743_core_ops = { static const struct v4l2_subdev_video_ops tc358743_video_ops = { .g_input_status = tc358743_g_input_status, - .s_dv_timings = tc358743_s_dv_timings, - .g_dv_timings = tc358743_g_dv_timings, - .query_dv_timings = tc358743_query_dv_timings, .s_stream = tc358743_s_stream, }; @@ -1834,6 +1840,9 @@ static const struct v4l2_subdev_pad_ops tc358743_pad_ops = { .get_fmt = tc358743_get_fmt, .get_edid = tc358743_g_edid, .set_edid = tc358743_s_edid, + .s_dv_timings = tc358743_s_dv_timings, + .g_dv_timings = tc358743_g_dv_timings, + .query_dv_timings = tc358743_query_dv_timings, .enum_dv_timings = tc358743_enum_dv_timings, .dv_timings_cap = tc358743_dv_timings_cap, .get_mbus_config = tc358743_get_mbus_config, @@ -2110,7 +2119,7 @@ static int tc358743_probe(struct i2c_client *client) tc358743_initial_setup(sd); - tc358743_s_dv_timings(sd, &default_timing); + tc358743_s_dv_timings(sd, 0, &default_timing); tc358743_set_csi_color_space(sd); From patchwork Fri Apr 5 14:14:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786377 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 A653916EC05 for ; Fri, 5 Apr 2024 14:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326518; cv=none; b=qOE2mbx6+sN0dNj7FxlaCcAddgOroE2HxppVgOKlW30RgDGN2AlgdYw8KH9a9vra9tzogTEy1E8zhri1qZq35RGk9sN+ufwu11kKT1INbSjXHn2va1fmUGqTC/0wKHPd4wFB7X6m6te0KMg+xf9YqvOBpeoVuTFcq0oXf9ATeYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326518; c=relaxed/simple; bh=ntS1pULOfao09pkQklGZunQlgY3iQS75f26X4n18NUw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=n2UVeSOpsX5Z3XbOhYhEBoc0Yrs2YMZSABIjyY2SsiawtHL9hXezWF/w0bs5N1BT0d3kKgvk98W6NH5LeLPcUJJlz9lUtDuBs7g0nRHJ9/T1SxlIcJyfItNq/0s0r8obiWqYxaGzt1PGLNhFgY7TFjfnUlDqfXaczxagrZfxJaQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qRkHnNXK; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qRkHnNXK" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-343da0a889dso757867f8f.0 for ; Fri, 05 Apr 2024 07:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326515; x=1712931315; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=u/DYRsGuD2azP54ih0vSn8RrFIexS1cmRe6nsqzzojM=; b=qRkHnNXKIYbHHthPbRLJGyG/3qm8nlmuS6LXEYAPcqVgEwOXjgySjvseR1NnGuzy26 UtWq1BzLHoPhH3ONLPZBlV5hZMnErzPukIJ2N+Xm6jIBCG4vOb2TxBXjwh+n0t1FKOq+ +KyVSILdrrLX+r7UyD9pckK0qoqQC9HRg2YAbbQ+QwrsTSJG3Z60J3+RLt81vubRXGEa A479idsPVc7bVzK42jZrCXL94/daRzg7CjzVdswwzkL94SBZol00xDKhlV0otUU2BiMg xAZ/6OCTXZBSpOKT72D8BTL8KHVahqti9eWVLYzomYEf9iEsx5rguOba/Yd0ErYlCFhv 4vIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326515; x=1712931315; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=u/DYRsGuD2azP54ih0vSn8RrFIexS1cmRe6nsqzzojM=; b=VJzF0cMWhXwiHPv/vp/WR3b/ugPrv9dRbKS2PYBdSwuZF3clkxJRTQ1+jTz37LkNim cMeYWgqF7VvOixnlHhx96wnKkbhl9BD4xie7DigGdAb+4/9BTD1UBETorWFNfJySt/zZ QdZBv446ReilxX5zP26LRnpDGML59U51xUSXJOGOCzvBXTXNHqOQV7i2rbsKVmI9jsnB St2xAAk4Zc4IKk18UH5NWJ+pEARay9N2N/tBjccmWt5ZkatpTuU0tZLxrE1TbHf77LgL BQ7ebE9agLXakQGUjwAclKGvSOEfz6DL/fgbCvpPGkRLPsis1Muy+eFAQIbxs43M41Zg c9lQ== X-Gm-Message-State: AOJu0Yw78fDzVnlCDFbEiLgp7f3vXvlErNjpbENWcmjOmWbPU0c0j7og 0Q2g484ZPAYJ29VW+5Sm7+FjdTsActqclT59egmSfO8a3+SxU6kk3E1aS2TxpqyTbqHHRroY/FE +APpQyYLOPg== X-Google-Smtp-Source: AGHT+IGVcif+Faaig453j1h+31TrZh3tBMb+AFeW0Uj0gxfTGG7Ih3adQK1q6wGfDlzXEzt+uvm5oUV+rRa+3A== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:adf:9d91:0:b0:343:8420:4d1c with SMTP id p17-20020adf9d91000000b0034384204d1cmr3903wre.3.1712326515313; Fri, 05 Apr 2024 07:15:15 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:02 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-8-panikiel@google.com> Subject: [PATCH 07/16] media: i2c: tda1997x: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/tda1997x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 8e4a0718c4b6..55a0b5d39893 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -1669,7 +1669,7 @@ tda1997x_g_input_status(struct v4l2_subdev *sd, u32 *status) return 0; }; -static int tda1997x_s_dv_timings(struct v4l2_subdev *sd, +static int tda1997x_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct tda1997x_state *state = to_state(sd); @@ -1694,7 +1694,7 @@ static int tda1997x_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int tda1997x_g_dv_timings(struct v4l2_subdev *sd, +static int tda1997x_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct tda1997x_state *state = to_state(sd); @@ -1707,7 +1707,7 @@ static int tda1997x_g_dv_timings(struct v4l2_subdev *sd, return 0; } -static int tda1997x_query_dv_timings(struct v4l2_subdev *sd, +static int tda1997x_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct tda1997x_state *state = to_state(sd); @@ -1724,9 +1724,6 @@ static int tda1997x_query_dv_timings(struct v4l2_subdev *sd, static const struct v4l2_subdev_video_ops tda1997x_video_ops = { .g_input_status = tda1997x_g_input_status, - .s_dv_timings = tda1997x_s_dv_timings, - .g_dv_timings = tda1997x_g_dv_timings, - .query_dv_timings = tda1997x_query_dv_timings, }; @@ -1930,6 +1927,9 @@ static const struct v4l2_subdev_pad_ops tda1997x_pad_ops = { .set_fmt = tda1997x_set_format, .get_edid = tda1997x_get_edid, .set_edid = tda1997x_set_edid, + .s_dv_timings = tda1997x_s_dv_timings, + .g_dv_timings = tda1997x_g_dv_timings, + .query_dv_timings = tda1997x_query_dv_timings, .dv_timings_cap = tda1997x_get_dv_timings_cap, .enum_dv_timings = tda1997x_enum_dv_timings, }; From patchwork Fri Apr 5 14:14:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786637 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 8687E16F852 for ; Fri, 5 Apr 2024 14:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326520; cv=none; b=mQSEPv1ma6kYHqIz0hhvp2OzTS/NOywXAtjEu+F7oovSMyeCWp6jlqTCCzUqf3Br4N85leh6UD1sDz8CwObS8xQ4r0cG5V8Ji5ABEjdrw5niNJU99M6g5T8EFru+/x84IJFwu8SvGoFOcadqlpGcducO/A1/dCoUe9eS0U/lEN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326520; c=relaxed/simple; bh=ZMS7hM6KW9z07sWnfqtb0vfUnCFSGDurCvDVGwpKtH4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=lUcmF/Vrg0ISMr8qRgDN3SIHv9HBPA7PuvwNoTKFWa0lKqElK1aDPJuuHfOwsd23OpRGchqVBn0Pm6YTY44Wzrxw/CAdRUmwGopFdbR0URMXYoh8dmIU1EqqsmMgQglWfReNBuBED3QF/Izie01y0gB1QagHnJVMjbWPcMBWNxc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=koNcX9m1; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="koNcX9m1" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dced704f17cso3849748276.1 for ; Fri, 05 Apr 2024 07:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326517; x=1712931317; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=94YlLU32Aw+sMxB+PMoafcDiaHrqtTcDMU3Gx4Hxs1I=; b=koNcX9m1Ps2wwp0tQBqFmNo8qemsmuR+pkJ6lBfjalreLVYj/Zg9JtbXfU70owHpWh gPAqGJDJIhZIIxEwuucfEyiAylMu1JOTyWOleu7XpgjxDxixOvtMxq1/PVfx2//nLIEe w1eGhREbvLdrl6mgqJ0RWWrXZMzpYvQft2Znd3xun1qiWyJ6ZaHp61+1Y4BKDlfertnY 0Vyc7SYwtitDBZ7TZLZ7iJIfTjJaoBFdEdSKJ/aEzElPRkcVOVJ/gVkXO4M+bbkDXGDl E3EjnCEcd7+9m1VEHmauaMeYN6EuJ20XJWndN9QzTn9M/x12GlY/BhXURA1Hl9CMWvbF WO1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326517; x=1712931317; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=94YlLU32Aw+sMxB+PMoafcDiaHrqtTcDMU3Gx4Hxs1I=; b=GhVoSFOtVi4BpF4cPreMHCdHruVe79RBBTWm/7F6Jcil5da0iI2JRPldUinvTssC75 LVdBnhHFswaVucwPQ3vG7XuQoI3ZziTux/yxV2ss45vM9H4QC2ebS1PU/nOT+OGWiJpI 44i6fbC3HucgGExZS5CaWuOInXC6tDxejBqLxomBsXatV66zVOOMrVrlZIFgPc+NI11y rVYLXUq74JCBe8wJ+ixSkiXzx7d8PvRoMfmve9P2SUyty49sKqjaZ4RZ1KCVypJinSOV 9iST4g8hiqnDPLAqgFWDCXihrEwlOVUufhV91fFwhcKDs6m0hqxnxIfcUXCPxdbuqt4R JKkA== X-Gm-Message-State: AOJu0YzgZdWJcj7TJChBP7L9/kXgOhU6b2wgKZmPS2b0O1eyrFWFKlll 3zevX8Gxx8rDV35kRXLUh7X9msUrRk3XAEMeoskcZsJ/2zPckZxe1LTljsaf7pNy1O2X3I1lIho iqUpTH1s80g== X-Google-Smtp-Source: AGHT+IGrK5D+Al9x3FTMCHj14GU/jIUebXWjMWxE2WeT0/GABiLAK8y3wTuNfqwVvbVtebybpNUuNDmYAKkDAA== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:1502:b0:dd9:1b94:edb5 with SMTP id q2-20020a056902150200b00dd91b94edb5mr78790ybu.10.1712326517609; Fri, 05 Apr 2024 07:15:17 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:03 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-9-panikiel@google.com> Subject: [PATCH 08/16] media: i2c: ths7303: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/ths7303.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c index ea70c1c13872..5e4a76eaf507 100644 --- a/drivers/media/i2c/ths7303.c +++ b/drivers/media/i2c/ths7303.c @@ -193,7 +193,7 @@ static int ths7303_s_stream(struct v4l2_subdev *sd, int enable) } /* for setting filter for HD output */ -static int ths7303_s_dv_timings(struct v4l2_subdev *sd, +static int ths7303_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *dv_timings) { struct ths7303_state *state = to_state(sd); @@ -210,7 +210,6 @@ static int ths7303_s_dv_timings(struct v4l2_subdev *sd, static const struct v4l2_subdev_video_ops ths7303_video_ops = { .s_stream = ths7303_s_stream, .s_std_output = ths7303_s_std_output, - .s_dv_timings = ths7303_s_dv_timings, }; #ifdef CONFIG_VIDEO_ADV_DEBUG @@ -317,9 +316,14 @@ static const struct v4l2_subdev_core_ops ths7303_core_ops = { #endif }; +static const struct v4l2_subdev_pad_ops ths7303_pad_ops = { + .s_dv_timings = ths7303_s_dv_timings, +}; + static const struct v4l2_subdev_ops ths7303_ops = { .core = &ths7303_core_ops, .video = &ths7303_video_ops, + .pad = &ths7303_pad_ops, }; static int ths7303_probe(struct i2c_client *client) From patchwork Fri Apr 5 14:14:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786376 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 2D4D316F905 for ; Fri, 5 Apr 2024 14:15:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326522; cv=none; b=tBP5prZvbwrNNk7ytuXSxq/0vf4eVU3e6v5NQ2RTVLlouECsssl/eSs7aPxywgaKeGwn+jylkvj+zW2jiIjgEnMj7MfP3jJZFdQjfvV8+fhgvanWOCy6W6mo5F9UH4nk3j7uwIJHktDYcovuHvEqGOfWu9zAgAegsYa+uHhg3S4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326522; c=relaxed/simple; bh=6SE0kPCYxfLmOcadEJPk07sX9YIfwYS2lpWnkue2zR8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=etLi8CHfuuTCNTiUcUqnubeIpgez7VQ/PNyD3NUZ2VrTuNxK0RMZOfXRTlGTzbNUUSn0r7nTQHIsT7njPYI2uRcvIIxBFvUmC9jgBCH7ctJlaqwbUNlJV/x0XfYI4ugQSqkpbQHWn+XIZHngjS65b22Kkg1HJ7d/SC2f4vZWg2A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aGVrssa2; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aGVrssa2" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-41481ad9364so16300395e9.0 for ; Fri, 05 Apr 2024 07:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326519; x=1712931319; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=tPWJ94tQJYhK3/OOBFjDm8S/NzfWr3sQ4mvAu40pbWw=; b=aGVrssa208/JedoXdhuAsfVNsbChm8ilvckj5H+2nfjKmQhqWXzeEFotcsfeNU7Ngy G6qqHzMWDo+GYN/rs1Ot/FsHE21DGl28cYBv8MKFsModJMsVnhlgN5XDI02CezGC/cD5 yHlKpH97FucAjF1VfHEeyrtkTnCGC0+Cy40BWpiGTFcss4wYCTWMuuloRmGM3+hX1DE1 ZIg47Uuqx4VMzT+A2+Fjz+CwC0KMRCeU5sDF8JhbSYiipNNL+Qx44Dep88ITy0R8zOw3 ySHS5peYFH3y1XPMk+fjBCtDr7qOETY5vlcHPYF3jfegCP6KZx9bxaDk9w/djpf44yXN NJfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326519; x=1712931319; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=tPWJ94tQJYhK3/OOBFjDm8S/NzfWr3sQ4mvAu40pbWw=; b=YhhAB+Drt8bldo3uyVFuZs5OGkVk7S2gcZcYIaUDHNKeCjujH9FXswgjNJnB0EzUT9 tBSUo2usr3U3uJ6B3QzWs/InfRyn+90h/ahrl1XfoY7NaQR4jdvySscqmd/atC3xAFNa MoJ5v8Qvyu4WykVA2pzR8cDcMar+5pT5dLTuW96+5fu/0gOiwjBYeIbbCanSRf2MmPpz zC4Je2UsmNEXc6ViXjOmfn+7piRQ3Qz1xmAzEYnMxI8j2ck+HjzmqNOn5cuwYqDt9L/X vOgdliySaC9VcX17kxf3Ab84vJdoqQ8EAH2Oh0vhvMODSiYwjNmi1l2qefH6FGW0BKhS 9uyg== X-Gm-Message-State: AOJu0YyHUx9UPNQ1tCE1j+YdhN+Or88MdsFxMxotWDtgrTX1iAppM9fx goCHaWhemEwyc+juVaEDiClw1VCyZGH6quSlsTZt8GeyjnyMce6+dsAjNloYMteNFR4b3Rl3NAa gf1Zo+ohlGw== X-Google-Smtp-Source: AGHT+IHQfTupTS6QFxw4wd1lUfUH34e1AoeuC2pe3b5AQePG8p20sMvmkeKQHBjCW7WGybe4z/i4eJInLgDU+Q== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:600c:1d12:b0:416:2c7a:6b6 with SMTP id l18-20020a05600c1d1200b004162c7a06b6mr5110wms.0.1712326519687; Fri, 05 Apr 2024 07:15:19 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:04 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-10-panikiel@google.com> Subject: [PATCH 09/16] media: i2c: ths8200: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/ths8200.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index 0e0f676cd221..ce0a7f809f19 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -358,13 +358,16 @@ static void ths8200_setup(struct v4l2_subdev *sd, struct v4l2_bt_timings *bt) bt->hsync, bt->vsync); } -static int ths8200_s_dv_timings(struct v4l2_subdev *sd, +static int ths8200_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct ths8200_state *state = to_state(sd); v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + if (!v4l2_valid_dv_timings(timings, &ths8200_timings_cap, NULL, NULL)) return -EINVAL; @@ -385,13 +388,16 @@ static int ths8200_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int ths8200_g_dv_timings(struct v4l2_subdev *sd, +static int ths8200_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct ths8200_state *state = to_state(sd); v4l2_dbg(1, debug, sd, "%s:\n", __func__); + if (pad != 0) + return -EINVAL; + *timings = state->dv_timings; return 0; @@ -420,11 +426,11 @@ static int ths8200_dv_timings_cap(struct v4l2_subdev *sd, /* Specific video subsystem operation handlers */ static const struct v4l2_subdev_video_ops ths8200_video_ops = { .s_stream = ths8200_s_stream, - .s_dv_timings = ths8200_s_dv_timings, - .g_dv_timings = ths8200_g_dv_timings, }; static const struct v4l2_subdev_pad_ops ths8200_pad_ops = { + .s_dv_timings = ths8200_s_dv_timings, + .g_dv_timings = ths8200_g_dv_timings, .enum_dv_timings = ths8200_enum_dv_timings, .dv_timings_cap = ths8200_dv_timings_cap, }; From patchwork Fri Apr 5 14:14:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786636 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 27AC216F91D for ; Fri, 5 Apr 2024 14:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326524; cv=none; b=dzwwZQ0R/E6dJ4IuI8IifBEXlXBmGgnVlknBkOb5vBexLJVSl3u67NtucTjwXuc0Ya+OtqOmm2XgzpeF1xW9ulN10blEt68zl08fIEcbQ+4/vkWXDVuIXdXhn6fWDIHgXPNe/40h24hEf40/KFdJRRqyLDPMtwACpbkg6mo9BMs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326524; c=relaxed/simple; bh=5xnfmi2lBhW03BQCHOlNVYiVElPi3SW0dm8sNuaFNl0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Adh0HrH7QlawJRv1nm8MF6zZ5reTQmoC9wbN/EbLUsfif1iyAVbfPah1r3xRtrzCl+yXU6EPHxNcnLCaJlKo58I5F5PMZ2IFp6vVBm8Vq0+MmoBnIafMtHNWp/CyY+ujJc92WYsQTH6yMcT6WvJ02kVG4QJTg7nITc132+autAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Se8eeWoI; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Se8eeWoI" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4162ba19021so7695435e9.2 for ; Fri, 05 Apr 2024 07:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326521; x=1712931321; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=lsbtTl/lsCYzP7KPwMVeecq4kI9jqfdKIXhI66el1Xk=; b=Se8eeWoI87xA6B53PvKAoBuk0DYolqT2e1Ct54thzg3XTtLGnTP4W2FwOgw3aEFvRk +nd96GDpkFmuWkZUfM8MnDtuOGHXUDuxR9vRaWo90ymQieOMRCxt2C9av8rMurmmbk77 PKKwGuDg1CUJbaNBDn318EUehdXAIuAhD82z+XO+REcaXwt3klGypAHKpgf5GHdVrYUy 260/EMVDCKqGFuNjRvSXM1wqWq5C2UtZ3RZbIAnHP57jsYtLD/djIfSk8gpjtY+tSTj4 s51Toj9fc0q4fNeqm1RAz7DNYEBwm2d431+wFrUpBZevBIxOU5LZ3FnM4xgi2rIwfcup KM2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326521; x=1712931321; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=lsbtTl/lsCYzP7KPwMVeecq4kI9jqfdKIXhI66el1Xk=; b=iL/c3K6+sE2U7x5v/51aBNLHw2yDrVqlkAYUGZcje6BVQB0KCpehsJEVfGDUPvTpzV pxFiwBQ3LmS69RI4Wi+VwduU8Pddu3zFiGzCzOV2HUiZW7qiz1XYt11b39B0hVr/p7GG 48I/0Dn1VJZxYxLFkV5DTCv08Ohaz8vztrzqMXIhHIlUx5yb67a/NFKrkhh7g2i2Pzto sBEB/0ckkXWWDrCuLyXJsxLds02xvSKj/tr/46zQ+NCh9Vgv3X7ZTYD6edeakPgT65bB HxZNAbQbFa8V+XZnsZHgq8N1OXwxQdzDJj1cZESrRZRbOaysAT+En0ODQnaPC6rMsMq2 vV/w== X-Gm-Message-State: AOJu0YwMYD2HzjH79M0Nnd/uO/r8FD7Zem6HLca7N7U9IZUgBNaHWo9n wQYsmLgkTWy/EnKzwT+TnQOqeokjy+DTIH0ltaTDJ/zAe8MKF0vJzVZuFAs7yJmjJzjq9p8WjtO tfVH6je9WJA== X-Google-Smtp-Source: AGHT+IH7z/NIPYYuKTmisFXZIC5ABdbzSu5MmdtE9zAPHxlH0uA6LOlXz/68FujAlmVAv7FZ/1iKrTnqtbILTg== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:600c:3b08:b0:414:76ce:98fe with SMTP id m8-20020a05600c3b0800b0041476ce98femr4860wms.5.1712326521624; Fri, 05 Apr 2024 07:15:21 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:05 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-11-panikiel@google.com> Subject: [PATCH 10/16] media: i2c: tvp7002: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/i2c/tvp7002.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 6a04ffae5343..881b54f46d41 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -546,13 +546,16 @@ static int tvp7002_write_inittab(struct v4l2_subdev *sd, return error; } -static int tvp7002_s_dv_timings(struct v4l2_subdev *sd, +static int tvp7002_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *dv_timings) { struct tvp7002 *device = to_tvp7002(sd); const struct v4l2_bt_timings *bt = &dv_timings->bt; int i; + if (pad != 0) + return -EINVAL; + if (dv_timings->type != V4L2_DV_BT_656_1120) return -EINVAL; for (i = 0; i < NUM_TIMINGS; i++) { @@ -566,11 +569,14 @@ static int tvp7002_s_dv_timings(struct v4l2_subdev *sd, return -EINVAL; } -static int tvp7002_g_dv_timings(struct v4l2_subdev *sd, +static int tvp7002_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *dv_timings) { struct tvp7002 *device = to_tvp7002(sd); + if (pad != 0) + return -EINVAL; + *dv_timings = device->current_timings->timings; return 0; } @@ -659,12 +665,16 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index) return 0; } -static int tvp7002_query_dv_timings(struct v4l2_subdev *sd, +static int tvp7002_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { int index; - int err = tvp7002_query_dv(sd, &index); + int err; + + if (pad != 0) + return -EINVAL; + err = tvp7002_query_dv(sd, &index); if (err) return err; *timings = tvp7002_timings[index].timings; @@ -861,9 +871,6 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = { /* Specific video subsystem operation handlers */ static const struct v4l2_subdev_video_ops tvp7002_video_ops = { - .g_dv_timings = tvp7002_g_dv_timings, - .s_dv_timings = tvp7002_s_dv_timings, - .query_dv_timings = tvp7002_query_dv_timings, .s_stream = tvp7002_s_stream, }; @@ -872,6 +879,9 @@ static const struct v4l2_subdev_pad_ops tvp7002_pad_ops = { .enum_mbus_code = tvp7002_enum_mbus_code, .get_fmt = tvp7002_get_pad_format, .set_fmt = tvp7002_set_pad_format, + .g_dv_timings = tvp7002_g_dv_timings, + .s_dv_timings = tvp7002_s_dv_timings, + .query_dv_timings = tvp7002_query_dv_timings, .enum_dv_timings = tvp7002_enum_dv_timings, }; @@ -1001,7 +1011,7 @@ static int tvp7002_probe(struct i2c_client *c) /* Set registers according to default video mode */ timings = device->current_timings->timings; - error = tvp7002_s_dv_timings(sd, &timings); + error = tvp7002_s_dv_timings(sd, 0, &timings); #if defined(CONFIG_MEDIA_CONTROLLER) device->pad.flags = MEDIA_PAD_FL_SOURCE; From patchwork Fri Apr 5 14:14:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786375 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 BA52616FF41 for ; Fri, 5 Apr 2024 14:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326526; cv=none; b=Hu7nL0thZIStFwWYr+1RtRObJnFm0LEWNwDlWLrJTpWf2/Zt9tgU38bq2ogHYby6U4LE+bwoWjIYQXMu3m5mBELvcU86s1SKOjARW4c+UWCYnu1LliMYb+wrmvwteQ0C6b4V6fHDgwPHr/wgcYu1DeYjuAuCMpe8dg1zmy8mVm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326526; c=relaxed/simple; bh=NDwy44L0Jhu5ltK/Qxlk6F2up/ZRjhK55Rnmu42WtFo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=l2osZ12iNm8a4r2ZwOubnoZT7gBL1uYp1Wtqu6JqGxp7CtCU6o3DPxOUPVRPQdn+RfRMvVaL5osLyfOOX/iZDibwWx+tkpbDE7dOT/f8VDST+mGPrjGiOmX5jUS+awu9T+rrBVoCqtozBqqOiaxFZShB5qWLIAPTVpTiPq5nU+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iGkRBpWr; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iGkRBpWr" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcc05887ee9so3254679276.1 for ; Fri, 05 Apr 2024 07:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326523; x=1712931323; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=lJXjeQEubm8j9rzfDm3JhpB2lxNrpssVrF6JxlheeFU=; b=iGkRBpWrTtvioIUngKWxG6ipIXrrTGsmm0rchtJGXXLdkDfXTl/lYb4pAPI8Mxa5ad 3KD55i7DxmNgZI8K/14Ks3B05gg200XD8rgwTY/CV7vBdhJiKGr1fE3vTDeuy24JJe+M kd1lDsHeJtB9Ti++HBeENFzGzhcdaV7l6fj6wPUOfo+xJWEMH7sf/xg+Y6RQfGLxSKqE 5OF8ajTSDbzta5a+FpISc4Flk/s+a+Is+XA29aWU1tvAzr+lsG4WG7F9r0Ty+SV9WJ1d CHPdXWXDl8S+xJKnqnJ/r4KvpCCr9wQb+OkANqdBjKuxKMTSvI2OBOM/+jMsVp+IL+tO c1rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326524; x=1712931324; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=lJXjeQEubm8j9rzfDm3JhpB2lxNrpssVrF6JxlheeFU=; b=gX0V4gsUX2BCPQGDfS8bQhBNppv/Dp57I9gUuYPSnrViHtZR2cdoSKP7qwrUPygzsu 2ELiXD5rJhY7/i/jt2Zv7iGmvv3D5rL+2hpfbuP8uSaLkJgQVN0+H5oc91tR/zIb3C2X nQytlmH0qmd7HbQtRHjxDXuBhZRFSn1Stkl08SpvYU7p13pSck77Gl1a03EZckS+sxFM Cbre5DmxES6Nx5AkhL6Mfklx9oFzbE45RRTutjgS5nmcsprVJ1ehGCOi7vTYX7EkjNR3 QGZ+nflvdCiqskBiyHBnr72KkbbOWOykxvl+VIXxEck0SwJ48msPTsTIvDkJ1bVH09wX kDwQ== X-Gm-Message-State: AOJu0YypqbGOyNs5ltwaqjN9eQ5pDtLdV1I9eLnpDX2o8GDHzB1eBLP/ oWV0cJ+gyUOd8cKJGhT71Iz9UEAXICkckzQFqXzUpLJBUEftU172uPBNAWRY+dabpCHbzXfWyus HG6VpzR/n0A== X-Google-Smtp-Source: AGHT+IFVFwlZU1PraJh7zR4KWB5k+lXQt0DhRwiJsHwWvJZodZ5pAkCM37kDWlFescohXveYraQyCFA+NS+Tqw== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:f87:b0:dbe:30cd:8fcb with SMTP id ft7-20020a0569020f8700b00dbe30cd8fcbmr71259ybb.0.1712326523732; Fri, 05 Apr 2024 07:15:23 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:06 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-12-panikiel@google.com> Subject: [PATCH 11/16] media: spi: gs1662: Switch dv timing callbacks to pad ops From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Change all (s|g|query)_dv_timings subdev callbacks to include a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/spi/gs1662.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c index 75c21a93e6d0..44f97e99ff15 100644 --- a/drivers/media/spi/gs1662.c +++ b/drivers/media/spi/gs1662.c @@ -259,12 +259,15 @@ static inline struct gs *to_gs(struct v4l2_subdev *sd) return container_of(sd, struct gs, sd); } -static int gs_s_dv_timings(struct v4l2_subdev *sd, +static int gs_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct gs *gs = to_gs(sd); int reg_value; + if (pad != 0) + return -EINVAL; + reg_value = get_register_timings(timings); if (reg_value == 0x0) return -EINVAL; @@ -273,16 +276,19 @@ static int gs_s_dv_timings(struct v4l2_subdev *sd, return 0; } -static int gs_g_dv_timings(struct v4l2_subdev *sd, +static int gs_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct gs *gs = to_gs(sd); + if (pad != 0) + return -EINVAL; + *timings = gs->current_timings; return 0; } -static int gs_query_dv_timings(struct v4l2_subdev *sd, +static int gs_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_dv_timings *timings) { struct gs *gs = to_gs(sd); @@ -290,6 +296,9 @@ static int gs_query_dv_timings(struct v4l2_subdev *sd, u16 reg_value, i; int ret; + if (pad != 0) + return -EINVAL; + if (gs->enabled) return -EBUSY; @@ -410,14 +419,14 @@ static const struct v4l2_subdev_core_ops gs_core_ops = { }; static const struct v4l2_subdev_video_ops gs_video_ops = { - .s_dv_timings = gs_s_dv_timings, - .g_dv_timings = gs_g_dv_timings, .s_stream = gs_s_stream, .g_input_status = gs_g_input_status, - .query_dv_timings = gs_query_dv_timings, }; static const struct v4l2_subdev_pad_ops gs_pad_ops = { + .s_dv_timings = gs_s_dv_timings, + .g_dv_timings = gs_g_dv_timings, + .query_dv_timings = gs_query_dv_timings, .enum_dv_timings = gs_enum_dv_timings, .dv_timings_cap = gs_dv_timings_cap, }; From patchwork Fri Apr 5 14:14:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786635 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 6B692171070 for ; Fri, 5 Apr 2024 14:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326529; cv=none; b=Hbr/cT+154E6EgqdSBE/dh37D4i6vHg20TMms3VzJzUY7yYgrmryyEW7X6hGN3FiRrnR5Q1G1Uua5DnztoEbz+bPm0tacRu2rnMOV4FJvtmdXX+BD8wsXvhULqlzXmVGEcc72rDRJTF/H76CnacQaOeZEbOGr8CM2fukBNjlqE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326529; c=relaxed/simple; bh=mfc1m6KDq5p7GnXUa2OC5+vQdowDmHrvR4jMIquIzew=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=oxSx50GD1neBrQlAX4ceWVM+Q9OhyHXV2iEN2lWkCQaB+ROEVHQhHSY3FbASmhVNEBgJEBRxH/d3DXwvm6SNj1i+38Kyc+OZhwT7RIzX7aLUnPyAKDgxOPwTj+dtC7+CWlIfMWHgaKjMb3b1l8GSYA9DW3JMlUR8CZd83BJ2RM8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ifTDKXB0; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ifTDKXB0" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4162b93067dso8235745e9.3 for ; Fri, 05 Apr 2024 07:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326526; x=1712931326; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=wugwx+VMt8ynxKvmOS+NYWFgHzSCikAiIg38gbA/J2Y=; b=ifTDKXB0IPsN1TKwwdaZSIgfQoNkhEOnvZkZzg5fnDOGNxgCPUzzU+JdxPp9RMvBii sPZNCCPprlffIp0fm7cbh6ucvJ2nieW20NrJMnUGK5K8tadoiYevaId3Af/MzMuo2HDD NHdPgOqR0lFxer+/mtFEVfISh4nmxFOE7GBdlUG8IJpoYIIjGvs1gY0dluiti9Iwi4c8 cQFnH6htFZlOoN3QKYoSzPDIJyPTWth7dq4aGOb3HQLR0dq5lNpLk2U+d/Ejg6icrziz wxzSPsyWoWKLHXWM4yoVEX6Z+VFZot9UBEdaFDTdnCDOuJMcpoDnqIiFGVpWdxgRSRuO odRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326526; x=1712931326; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=wugwx+VMt8ynxKvmOS+NYWFgHzSCikAiIg38gbA/J2Y=; b=Y2YfSxJbecWYz3Q0dGvPebPzlPlAj7ERbgoEynauGBe31bEEh5NEny73PzIa+UMFpD /MRzVOnBONBAsHEtL+SYw1em21ufFpyUH2ubc15OAYflU+IBCUmtNvciCl5E1ciHVCdy GLSQ/ELyJZwEGxt0nLrglDKHT948sCixQtuW5xuPxFlwjrPVl9t+FCr4lCJhLcBHsRua 6jSt4OMMSBpMR+BrcVwfIpyWr3LCaO4SgsGW1sJQHJbscUaA/WL0NwIAQ99G2w4woVzm Rx1W272dMEGJJReP/hAbRUD8i1yOgepC9J6kd7SW3R2VT/z9xD5svbsqlFKLT1xtFDu+ jaJw== X-Gm-Message-State: AOJu0Yzgv6Ev/xErbNm6qCbbqroRdc1HyBNPoa53Qfn6huMnTEzBCv6S 0MjFGXhL5h9937sUNyHKP4yh0Loc8aGCgP3wBnTrhav69FgqxnI7Px+YyeLEn2x2yl9zfVL5vVS KfUec1yM6Yg== X-Google-Smtp-Source: AGHT+IEw3A0Uc6NCN5jC8nFV1gniwcXIKQUoVyZzSeSYIjiu5QNMVRGAQCd+P4ZhwXiSptLaQwbbPf4g4bXbXg== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:600c:3b8e:b0:414:8933:a617 with SMTP id n14-20020a05600c3b8e00b004148933a617mr4543wms.4.1712326525846; Fri, 05 Apr 2024 07:15:25 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:07 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-13-panikiel@google.com> Subject: [PATCH 12/16] media: cobalt: Use pad variant of dv timing subdev calls From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/pci/cobalt/cobalt-v4l2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index 77ba08ace29f..d4d7b264c965 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -633,7 +633,7 @@ static int cobalt_s_dv_timings(struct file *file, void *priv_fh, return -EBUSY; err = v4l2_subdev_call(s->sd, - video, s_dv_timings, timings); + pad, s_dv_timings, 0, timings); if (!err) { s->timings = *timings; s->width = timings->bt.width; @@ -653,7 +653,7 @@ static int cobalt_g_dv_timings(struct file *file, void *priv_fh, return 0; } return v4l2_subdev_call(s->sd, - video, g_dv_timings, timings); + pad, g_dv_timings, 0, timings); } static int cobalt_query_dv_timings(struct file *file, void *priv_fh, @@ -666,7 +666,7 @@ static int cobalt_query_dv_timings(struct file *file, void *priv_fh, return 0; } return v4l2_subdev_call(s->sd, - video, query_dv_timings, timings); + pad, query_dv_timings, 0, timings); } static int cobalt_dv_timings_cap(struct file *file, void *priv_fh, @@ -1080,7 +1080,7 @@ static int cobalt_g_pixelaspect(struct file *file, void *fh, if (s->input == 1) timings = cea1080p60; else - err = v4l2_subdev_call(s->sd, video, g_dv_timings, &timings); + err = v4l2_subdev_call(s->sd, pad, g_dv_timings, 0, &timings); if (!err) *f = v4l2_dv_timings_aspect_ratio(&timings); return err; @@ -1099,7 +1099,7 @@ static int cobalt_g_selection(struct file *file, void *fh, if (s->input == 1) timings = cea1080p60; else - err = v4l2_subdev_call(s->sd, video, g_dv_timings, &timings); + err = v4l2_subdev_call(s->sd, pad, g_dv_timings, 0, &timings); if (err) return err; @@ -1243,7 +1243,7 @@ static int cobalt_node_register(struct cobalt *cobalt, int node) if (s->sd) vdev->ctrl_handler = s->sd->ctrl_handler; s->timings = dv1080p60; - v4l2_subdev_call(s->sd, video, s_dv_timings, &s->timings); + v4l2_subdev_call(s->sd, pad, s_dv_timings, 0, &s->timings); if (!s->is_output && s->sd) cobalt_enable_input(s); vdev->ioctl_ops = s->is_dummy ? &cobalt_ioctl_empty_ops : From patchwork Fri Apr 5 14:14:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786374 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 06A4917108D for ; Fri, 5 Apr 2024 14:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326530; cv=none; b=e2tfRnESuI8obLFcJsNJKanTN8+n4ueUjBn/jf8sdAgib0bZhQNEndLo1u26dxN3oqRarYMkUAejimMc46YcRQr5UkQHcdicK1Sjmrldj09nQa6jTiSYmJS3nUxCdY2RPvS4T8V18d6oFP3L5P3HrBjogQ1xIc3QFe/XKsKpQVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326530; c=relaxed/simple; bh=yvs5ohvMMIVQE6dxuoqe23hp8oOeKkHAZNgJM1b+eKo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mCUkyR1iDD/nMrV6wjHk1mJ9WURLZhMn2BfmcEsy9H2mQVzpDedlNyCDsP6t3AUHyJmBmBSlicWJG8OjK63N2OC+zk0bqAdciHCjfxWlL1z6jH0sdoIDA5Dn7pEesPfnhBII4lbwA44F7wyxAYMrkW+1+5SYvVMqNtBs3YuJtzc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=1NDS4pOq; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="1NDS4pOq" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc743cc50a6so2965908276.2 for ; Fri, 05 Apr 2024 07:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326528; x=1712931328; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=/C3TWz2wSP1NLw9gzEQpvHS/0ZIC1cjOjpTFuVIJ/6s=; b=1NDS4pOqa1MUMC9X9Dt/O2w125FOzhVlpogK4thoUyLctqpGh6i+LY+PxQj3blJ1tX q1HxiQNm/TqaSWQXI4Dhd6Bpc3WbxrFWuHIIVl6NzsrNMeFOhG2pCso9dK6N2Znw2seH Jd0bIfy9dHMziuUc/RoqvpnmHX+uz2oJc7tDVtkB2rzWFhteVVq11SV/70QFLsBn6zPj toaipmG4wLpkq0u4SgM7qehQ/PGOJjAnZ9GzVBbu09qmALdAmIGrTGSjXjJHsk+ATIV6 DA34rc44LaLekwFBaTkCRoQX881V9Jl0Y1YgCZwU04oQLTQOEDLb9+av/bVX3fzG7oto m0/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326528; x=1712931328; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=/C3TWz2wSP1NLw9gzEQpvHS/0ZIC1cjOjpTFuVIJ/6s=; b=nonrmmuLnfLBNaYxxjjGST5SZi9e2SiAVeD35jeJLwMRpg5bHSj/vs+9nm3XMpdbpf cZnkBLVoSKtQ/7GmpLzhsrhK9jX29u8nbAsTK/RZPMPKRnE+aTc++PhpFYUypJ+FuYTx mr0xYyStMe0gyP3e0GERF6YkH/U1UW5OjPX3Xl2OH4Ixo7xfsrdpVUjlraqXLxCP5OW0 z/7/aRO7lGg1GOEYEPLW2fDXKTG1OSFkN2+dp5AfSooLRkjOlV+OQcFQnemY+f/evLP8 crNoeECBVTNEvEgyo0+wAMJN+DA/irz4PBFVmYbvxbSgwbylWoG/73bC493CHXXcz8AE 5VhA== X-Gm-Message-State: AOJu0YyrNK+gbK0N8+Ts7UcQ1hailornkC/XQX/5bhnqs55LifJvV9KM Xsc/BkDHIhvXUEauFu6gtvOswaY2O0BpSv9zQvIlrersdo+tuOT1SKQMDNzHwlcPYds1dqQjWo2 g5WJQPpFXJA== X-Google-Smtp-Source: AGHT+IEvp+BsuWIh3iX4/LFegWn3KNCA11AfpYD2+Kk6/aMGIrt5lA5NyDXfFDJdRSyf+ooQiTrgoqyEH/yGTA== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:1108:b0:dc7:865b:22c6 with SMTP id o8-20020a056902110800b00dc7865b22c6mr78546ybu.8.1712326528036; Fri, 05 Apr 2024 07:15:28 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:08 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-14-panikiel@google.com> Subject: [PATCH 13/16] media: rcar-vin: Use pad variant of dv timing subdev calls From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel Tested-by: Niklas Söderlund --- drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c index 073f70c6ac68..bb4b07bed28d 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c @@ -730,7 +730,8 @@ static int rvin_s_dv_timings(struct file *file, void *priv_fh, struct v4l2_subdev *sd = vin_to_source(vin); int ret; - ret = v4l2_subdev_call(sd, video, s_dv_timings, timings); + ret = v4l2_subdev_call(sd, pad, s_dv_timings, + vin->parallel.sink_pad, timings); if (ret) return ret; @@ -744,7 +745,8 @@ static int rvin_g_dv_timings(struct file *file, void *priv_fh, struct rvin_dev *vin = video_drvdata(file); struct v4l2_subdev *sd = vin_to_source(vin); - return v4l2_subdev_call(sd, video, g_dv_timings, timings); + return v4l2_subdev_call(sd, pad, g_dv_timings, + vin->parallel.sink_pad, timings); } static int rvin_query_dv_timings(struct file *file, void *priv_fh, @@ -753,7 +755,8 @@ static int rvin_query_dv_timings(struct file *file, void *priv_fh, struct rvin_dev *vin = video_drvdata(file); struct v4l2_subdev *sd = vin_to_source(vin); - return v4l2_subdev_call(sd, video, query_dv_timings, timings); + return v4l2_subdev_call(sd, pad, query_dv_timings, + vin->parallel.sink_pad, timings); } static int rvin_dv_timings_cap(struct file *file, void *priv_fh, From patchwork Fri Apr 5 14:14:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786634 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 10A03171652 for ; Fri, 5 Apr 2024 14:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326532; cv=none; b=H3D7JcyExhQ9zgr9QI6Nt5GGrmbWGW0/zKcvGryzleR8CFtK0LejVXW+Ljo0hphgKUXpzcrtojp4aPtbDy4kInZ7uq26ybYC3XukJ8PmBVuZWO91gPHaOewLGDNZhDYHOz1beHn/ESedzJMV1NyfDv8Odv20/eMoffamsSH/01g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326532; c=relaxed/simple; bh=Gj3IPZ/cV8XkfW4/IgCRVRhUfpKtTDbbVSp/MYuw5kI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ogqV4T8tjg8aSZja/GzLl28jXU3sN7JLCUjmy6Gmy8X0KR71FlKuVV3l2IkCYMmuT/ZKfDyuuKm04cHABZS497BrwXm+HsHA/DdKO/01dAa8kwFRAGDSlJ0SrSt0olnEWlGML8Rmz1R3tM+UIQ62hrqfZ3NsJ/i2OijyzJ3in7M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=K6d0uWwc; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="K6d0uWwc" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dce775fa8adso3784929276.1 for ; Fri, 05 Apr 2024 07:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326530; x=1712931330; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=9A37cgV5rFPpxOwI7Xp0bOeOJhNv60o94qm0Vr/m29M=; b=K6d0uWwcZnkeh2hgIAOIU90QMYBZDeteKQ4gzvEQq+0lJzMIcPQk6p9Uo28cu+0ZvH uJh6ZGYj0UvMdPqoM9OvAZ69pXJn4x17eaLVy3d7yqctq0l64KWzPXpDY1iHcBPvWHqj QtTgfIVihF6LADjHlUllvC77h/v2kxJfD50K4EvuutWr5VRDUkuOre/QqvvXnff6OGfB MpHV1F098tnZw9ZFL5F2KEharw3+VlmjVVzbpSOn5jlvxdC7fjUQRQ33FrbIvKK+4E25 RTm2jv8M8IOxoJfbC8C7Xb5cDYgPrfJLtV0Y1voUENLKENjmThRtpg7NdE+Ow5ykj6Rn gVEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326530; x=1712931330; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=9A37cgV5rFPpxOwI7Xp0bOeOJhNv60o94qm0Vr/m29M=; b=vIT9OnoKtLxAXnm6u2z9bkMGrRe6cfj358JHWqwO0WHT/G4bRaQlApECz4bgXkaps4 eLRXCr3gEZK3mOsgj0558gHd6g3zeC6feZCX0uNroRI2ZtNbOQ/eCqCIwqfSvPPsiDoL mUPO7agLLen8YCyEIqX48Z+hfWKHcqOWoBVN96hixba50+5N/NagKV8UeN5HkRaDIaQN 9Xwb1UgYrmzqW+bwWAs18F6ykV8o7T6s8NLQMjgaTHUXMwUzlhdoTBLHdMAnNrHXh4XJ rGHQikkn+Gn0My8TH7pbLyAveQRUH8A/KxNQxn8D5Y5CTdHzNGXR6aOjP4UiGZou8ALb UTxg== X-Gm-Message-State: AOJu0Yw4xUKSbRmsDR7BeYclZQ6cyQ0fLU34cFWuGMmkh9HeaArCd3Uh jfzpticgsXpSNLzh2UvwGiNEnl7fxeQgs+YjUfFzNFLuHAvEnZIu1WkoxnwGBLeOoDvO1Map66f Va4LP5iqwUQ== X-Google-Smtp-Source: AGHT+IGf8GetzSX8AEJwlaqvDvL5MrA0JXoPMyjXUoUj+or0FEsWZ+U/ylOjbpKO18vhlQTas1pDdH/t0YW6Kw== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:100b:b0:dcc:6065:2b3d with SMTP id w11-20020a056902100b00b00dcc60652b3dmr394034ybt.8.1712326530209; Fri, 05 Apr 2024 07:15:30 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:09 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-15-panikiel@google.com> Subject: [PATCH 14/16] media: vpif_capture: Use pad variant of dv timing subdev calls From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel --- drivers/media/platform/ti/davinci/vpif_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c index c31a5566fc5a..c28794b6677b 100644 --- a/drivers/media/platform/ti/davinci/vpif_capture.c +++ b/drivers/media/platform/ti/davinci/vpif_capture.c @@ -1132,7 +1132,7 @@ vpif_query_dv_timings(struct file *file, void *priv, if (input.capabilities != V4L2_IN_CAP_DV_TIMINGS) return -ENODATA; - ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); + ret = v4l2_subdev_call(ch->sd, pad, query_dv_timings, 0, timings); if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -ENODATA; @@ -1177,7 +1177,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv, return -EBUSY; /* Configure subdevice timings, if any */ - ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings); + ret = v4l2_subdev_call(ch->sd, pad, s_dv_timings, 0, timings); if (ret == -ENOIOCTLCMD || ret == -ENODEV) ret = 0; if (ret < 0) { From patchwork Fri Apr 5 14:14:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786373 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 3CCB017167D for ; Fri, 5 Apr 2024 14:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326534; cv=none; b=bbrSn4HvnKv5eQj00dT/YcEPw5QxxRRc+NebggUpwAgV/Ys71T1P5dLxwoc52awx60ZSvD6M6gssdPYB+KU290jzYL4X09fTOtg7HbFDkI9DvY4lHrah6Vm8KClFUtR5DoCk6u3HUQKALLH/CkXerz8u6CUBoK3h2KEWWGMoIVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326534; c=relaxed/simple; bh=l0oG3N8c8mojKDmxECCVZ1V3hwbkCu1xRwc6SEUeGck=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pRHnXGxxPXfsqzpv/723Qzc5mqKeK/V66+bC2Xw0Qkr5xkHs+MR1jl+VGgVqV2fhpzFDoPbtQEfeSiHkMwonYwEK4RpjxHPKJc1zSMU2iHiRzgIOptqo3v9jaXV26gG+eEyydwNjFkZvD1IHjto+jho2LQ8Rmbh5WdrccuLculg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lGfM31qn; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lGfM31qn" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dd8e82dd47eso3266561276.2 for ; Fri, 05 Apr 2024 07:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326532; x=1712931332; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=HIc/vnSojBwtbKTlmQZ+P1NRRI2WMTZiwEa64VZPTHs=; b=lGfM31qnbTW8rUmAx5p+NPQwxJZcUuZOLG4Y2sn1VWK7CmT6WR3G65fN9SExuf4cQ4 kQxcpxezF8f1dO36zRBubuRdpDoDQcEHaPYBZNpgij9d6opO2ev25X/QOtRSCKx6YAd+ zgM7mx39tC5sApE94sTL24ZWxsjNvmMF9cvsBKZ/7qfp8QF/ThdVIVQ/OQpQdhjEiKUw pWfQ+cu5uF8dCNPZvJ2Jz/DuA34hVNiYhjFmVshHDrnMXsZBZNxaiKW3rlGf69aJN9zk zyUbw3nutYyEIu79f7fOq55MUNmCRliqtDS+spMzoYIi2HWPQEzCQqcvFAgDoN6TUwfh WBCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326532; x=1712931332; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=HIc/vnSojBwtbKTlmQZ+P1NRRI2WMTZiwEa64VZPTHs=; b=KQbLXw0CZhFTIGICuL+lG9oMmF2Ep+gGpvX9VQuLWlfP5iRd7sSs9/4Un20oizm7zt iLwz9cnyh8NmEu5oz8GNZOd7rD4wnxTrtP5PoR1pcaBX1L1t0odmrkKKAC6pk/rSnO6s d5GoF6cQW2I+ZkNomtBwYv/4WAGZk4ZFqnwsQ6MU9Ft9iqgU8Vh06wvFA+PzseOdeD00 04qrBnfoZlB0u6NPXBiVeTmPmOrRMoKs4Spxk+TsZTgdxLDZ1AUoSbSVZ38bm6dgVIpj 3doe3zt5CtinQy06jXmau98+EYvAJZtoxGBefl6jNFUreo5/2cuFH9N6eqBOiUvyQNMR 872w== X-Gm-Message-State: AOJu0YxRl90YCg2bkJjlfjDWg/HL3hWbSpst48sKYAkPHGK4TI01rMAT B2iZvdKAHNLHk5eYRA+I6EVa0iYXIe3iwuOh/F/39Ib6BGQLt9QBfajPpQptzmdplnmZ2qmdEXb SZ/4mjyNq6A== X-Google-Smtp-Source: AGHT+IEz1h6qQXkUMFl83+ZlYjZaKW4vvKVyMAs0V5zDifiOK4TkxQWVP3Z2WIWTgMXCjmjqeMR6zOmDG+MU6Q== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a05:6902:100a:b0:dc6:c94e:fb85 with SMTP id w10-20020a056902100a00b00dc6c94efb85mr72164ybt.2.1712326532310; Fri, 05 Apr 2024 07:15:32 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:10 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-16-panikiel@google.com> Subject: [PATCH 15/16] media: tegra-video: Use pad variant of dv timing subdev calls From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " Use the pad variant for all (s|g|query)_dv_timings subdev calls, which includes a pad argument. Signed-off-by: Paweł Anikiel --- drivers/staging/media/tegra-video/vi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c index af6e3a0d8df4..57a856a21e90 100644 --- a/drivers/staging/media/tegra-video/vi.c +++ b/drivers/staging/media/tegra-video/vi.c @@ -719,11 +719,11 @@ static int tegra_channel_g_dv_timings(struct file *file, void *fh, struct v4l2_subdev *subdev; subdev = tegra_channel_get_remote_source_subdev(chan); - if (!v4l2_subdev_has_op(subdev, video, g_dv_timings)) + if (!v4l2_subdev_has_op(subdev, pad, g_dv_timings)) return -ENOTTY; return v4l2_device_call_until_err(chan->video.v4l2_dev, 0, - video, g_dv_timings, timings); + pad, g_dv_timings, 0, timings); } static int tegra_channel_s_dv_timings(struct file *file, void *fh, @@ -736,7 +736,7 @@ static int tegra_channel_s_dv_timings(struct file *file, void *fh, int ret; subdev = tegra_channel_get_remote_source_subdev(chan); - if (!v4l2_subdev_has_op(subdev, video, s_dv_timings)) + if (!v4l2_subdev_has_op(subdev, pad, s_dv_timings)) return -ENOTTY; ret = tegra_channel_g_dv_timings(file, fh, &curr_timings); @@ -750,7 +750,7 @@ static int tegra_channel_s_dv_timings(struct file *file, void *fh, return -EBUSY; ret = v4l2_device_call_until_err(chan->video.v4l2_dev, 0, - video, s_dv_timings, timings); + pad, s_dv_timings, 0, timings); if (ret) return ret; @@ -771,11 +771,11 @@ static int tegra_channel_query_dv_timings(struct file *file, void *fh, struct v4l2_subdev *subdev; subdev = tegra_channel_get_remote_source_subdev(chan); - if (!v4l2_subdev_has_op(subdev, video, query_dv_timings)) + if (!v4l2_subdev_has_op(subdev, pad, query_dv_timings)) return -ENOTTY; return v4l2_device_call_until_err(chan->video.v4l2_dev, 0, - video, query_dv_timings, timings); + pad, query_dv_timings, 0, timings); } static int tegra_channel_enum_dv_timings(struct file *file, void *fh, From patchwork Fri Apr 5 14:14:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 786633 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (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 3BCC8171E5B for ; Fri, 5 Apr 2024 14:15:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326536; cv=none; b=Wk66UdIAhbSvGF27wLpXC4vmbI4CrHmpwRhdknh5aua/zT1iT709bpgawSkvDmutQkXwnR6RREzvFys7Huf1Jz6XIoaaWU6Dd+EP50Kk7kGU2pUhasYT4Onq6RFchr9sq3VeGLfIVdMkr53eowI+NFHmLPh3AEEjpImf8t/UIEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712326536; c=relaxed/simple; bh=i4Tr+nVq+Xi4RO9+q//9cew+LkXLU25d9j5EEYLNZ0w=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=XmoTCjvLThMe/PtUpUgOgw9PnlzDXwWNZQ8cp9/Q20SyleQRFZRr/EDxSenNT+cUfPQMaeZ+P32MaDBsTEZ2UcOrpg0eIQyVSfK+LhLuN++G0qwpnuhWyxT3i1FFXGF0awaRNs5Y+mJq20eH/CTmJfv0CeVwnXLLjmvkT2AwjB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=yCIY2Y5r; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--panikiel.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yCIY2Y5r" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60a4ee41269so37802857b3.0 for ; Fri, 05 Apr 2024 07:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712326534; x=1712931334; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=zsDOfX+3b1RUaLhcJa3oIsCx6Cf2GznngtDV1SnNmvI=; b=yCIY2Y5r52Kg6SeycmYxCmlYo5begxTNog5Kx0TJ9ixkHE7TKjqSHA6Ykf72dzaucG fYUsOsB7xI2/Lp8dPDQxyitXD+hKdadvHKdreDk03wTWvegycvnnQjysvhOYd+GmNsJM V9INDvqTjD6zRrL1UW3oVrRwAyVStaq89EU2rLASAn4InIOBcK9XUKm64D7zObIAPVT7 +KDf2U0j1fJXvQZ9EI4wj4PkXVmfYySLWw921dCyKovkc0JlgyxyAMVugJreVfC8K6+J 41LVyunD7aJBqE0+iKbMHbJOz3IsO3XgHc8nHPNZUCuxYx74dTJV0yRqaiYug50wnzoc 13Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712326534; x=1712931334; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=zsDOfX+3b1RUaLhcJa3oIsCx6Cf2GznngtDV1SnNmvI=; b=C5Q7WDw61o13FJhwlkW/ldop/wFwhDIJxzSMtQjnDY//wvCh5lJfvvqQqk1cUsr0FH toM6SdwZepQnVJFVsGBC1EJNbLd12wWyQ00nJj9as+hhyLxjKBak39xJsDR8Sml/nIJ9 4PkHgAvrdpSyUachxJELrpvltTy5weCaYKPBEFzAjgvRwKtfgUI/tkeUYfGeTjRexMJj zGdDRcufSIv0yG0jJNHjV3/Wge/Z302h0hWTng5KdEyEMs3V6crJFEjiUCi8eNvkA7Q1 va72X8RdUeceYAXJGn4XzDtYZCCO3Ce07N0Porn6Vtzqocm8alcSCApRhRJYKePv32KT LK8A== X-Gm-Message-State: AOJu0YylPdarLFmoOvnml2GNt27gAcyiJ2jdetMIeszgkjG1Od0ZOW8q MVl9PqxJd+9yLGk0JURUPN8+Tfsc8A3GccNMAe8wjIUK763KUTwWPFfguInqWFXcGyqRnAPfqmN WHur9mxFLfg== X-Google-Smtp-Source: AGHT+IEazU1D3+af0NVMWywuHy/ujQAr1fDtXw2VNn2XTE2hgtIiqfvfx0Pk6JxWWw8zhjW8vAbmO2PrbYxeKw== X-Received: from szatan.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2d83]) (user=panikiel job=sendgmr) by 2002:a81:6c92:0:b0:617:cb4f:a5df with SMTP id h140-20020a816c92000000b00617cb4fa5dfmr370403ywc.3.1712326534377; Fri, 05 Apr 2024 07:15:34 -0700 (PDT) Date: Fri, 5 Apr 2024 14:14:11 +0000 In-Reply-To: <20240405141411.1807189-1-panikiel@google.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240405141411.1807189-1-panikiel@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240405141411.1807189-17-panikiel@google.com> Subject: [PATCH 16/16] media: v4l2-subdev: Remove non-pad dv timing callbacks From: " =?utf-8?q?Pawe=C5=82_Anikiel?= " To: kieran.bingham@ideasonboard.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, tharvey@gateworks.com, niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com, charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, luca.ceresoli@bootlin.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, chromeos-krk-upstreaming@google.com, " =?utf-8?q?Pawe=C5=82_Anikiel?= " After the conversion of dv timing calls to use a pad argument is done, remove the old callbacks. Update the subdev ioctl handlers to use the new callbacks. Signed-off-by: Paweł Anikiel --- drivers/media/v4l2-core/v4l2-subdev.c | 6 +++--- include/media/v4l2-subdev.h | 14 -------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 07759cdd0844..6572667fd5c4 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -906,16 +906,16 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, } case VIDIOC_SUBDEV_QUERY_DV_TIMINGS: - return v4l2_subdev_call(sd, video, query_dv_timings, arg); + return v4l2_subdev_call(sd, pad, query_dv_timings, 0, arg); case VIDIOC_SUBDEV_G_DV_TIMINGS: - return v4l2_subdev_call(sd, video, g_dv_timings, arg); + return v4l2_subdev_call(sd, pad, g_dv_timings, 0, arg); case VIDIOC_SUBDEV_S_DV_TIMINGS: if (ro_subdev) return -EPERM; - return v4l2_subdev_call(sd, video, s_dv_timings, arg); + return v4l2_subdev_call(sd, pad, s_dv_timings, 0, arg); case VIDIOC_SUBDEV_G_STD: return v4l2_subdev_call(sd, video, g_std, arg); diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a5213411ef2b..1af16b16f0bf 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -452,14 +452,6 @@ enum v4l2_subdev_pre_streamon_flags { * * @g_pixelaspect: callback to return the pixelaspect ratio. * - * @s_dv_timings: Set custom dv timings in the sub device. This is used - * when sub device is capable of setting detailed timing information - * in the hardware to generate/detect the video signal. - * - * @g_dv_timings: Get custom dv timings in the sub device. - * - * @query_dv_timings: callback for VIDIOC_QUERY_DV_TIMINGS() ioctl handler code. - * * @s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev * can adjust @size to a lower value and must not write more data to the * buffer starting at @data than the original value of @size. @@ -490,12 +482,6 @@ struct v4l2_subdev_video_ops { int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); int (*s_stream)(struct v4l2_subdev *sd, int enable); int (*g_pixelaspect)(struct v4l2_subdev *sd, struct v4l2_fract *aspect); - int (*s_dv_timings)(struct v4l2_subdev *sd, - struct v4l2_dv_timings *timings); - int (*g_dv_timings)(struct v4l2_subdev *sd, - struct v4l2_dv_timings *timings); - int (*query_dv_timings)(struct v4l2_subdev *sd, - struct v4l2_dv_timings *timings); int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf, unsigned int *size); int (*pre_streamon)(struct v4l2_subdev *sd, u32 flags);