Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1129382lql; Tue, 12 Mar 2024 08:05:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUU6xrAG+XsTP7o+u+Bi0FPu7Ff1/Z4Jz1d7S+7nj5FiX5pqTLrQRW2YrsYy/FexBzVieqgqt/E38c4MABFZQylUdSea/5FDBGpvRcarQ== X-Google-Smtp-Source: AGHT+IHsDW8JEGC+YPcem1dPL0w9vXj1aOkml/CVjam6U59dk0iV07bKdt1Z45bNVUpSaqyPWw0v X-Received: by 2002:a05:6358:720a:b0:17b:fb78:4a1 with SMTP id h10-20020a056358720a00b0017bfb7804a1mr7430117rwa.27.1710255954303; Tue, 12 Mar 2024 08:05:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710255954; cv=pass; d=google.com; s=arc-20160816; b=FnUkzQQU71EeLaPtIs/J0mLzHcPcO2AmKgHWIKqMuIuVB19gHOiBnP7PvAnA1H8HUz MhP9eghmDHRLvk/A2qSrDnrs8y1yZbH7XP2NTEslF20mw+c4F83WlHmZyxdjPZeb16us oJvv0WzLsitrkANSiWrpgNVwmPHSKpY8+OU1VvDpgHc5MhJxV1+zyLG3JhWxAS0d8buW Jz3FrBWh18qNF2sMJr9SQauzepkYBbvJsJIxY7H1XzZIMgE2qQ4af/MHmcBA0nB/whne kTkZ6ws0Une6NqGz5YDLOdqF6lolmZyUxEozAWF+NjSOZwXXwpUK/TmxBzjtMeWIbJeM BFxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=qXoAYhHKfTUJsSlgTVytqgymms4yVPOoUBmHB7FY+F0=; fh=hepeNnR/0ASr/h/jFgTPrW0RK/FLr8fn1c1dFmhG9n8=; b=DNldfjM26ErpvU66+i+PSHE/ny/mWJDuth4Ghu+52EpsmeqRyoWvArrD52ZoHlpknb 8WhRc99/+NsA5Hzew0k/j6im8QMvp+1v+z+YPP+7kMg0GWSmTx37ZUHBR8OEeFsSjuCA opcln1r6t0NdS+AXjIuPyP3qzRidCivmNdFhdkDqwC38aFBxk3E+L69+ZTjWWozrkuiY k7P8xLtN/QkfuWT2v7cdnChZLsBHNZG06TqpkPclAGq0fqzs0c09ePjn+uG6Lm+BQlrG vKWhuvGzd7U7/aXC0cMj1xomaFrVMMlJ78ylvc8mAMzOLpDR0FaL2keRYmFUFLuvcu+c LGUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nLiwURvL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-100406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s13-20020a632c0d000000b005e425bf0f0esi6869294pgs.830.2024.03.12.08.05.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 08:05:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nLiwURvL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-100406-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 34E7CB21C66 for ; Tue, 12 Mar 2024 15:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B22437C087; Tue, 12 Mar 2024 15:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nLiwURvL" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3282A6FB9; Tue, 12 Mar 2024 15:02:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710255727; cv=none; b=MToSoO4KrYWmcaUjOzQWWyGZ7iPEQVDvlx3Qg1u4Oj0IsrH21MJHc6pPoR0xIjSQnGW9Un7MKAr0yd+cSePStDF+RhArqyXOlzObtDjvEljtLFlaCK03DaWMVPFqJaj5ZrGIPY8Vb58Iyr/EfU1TFUqm2ceUpuA0PG0gsMhIXJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710255727; c=relaxed/simple; bh=+2b6ed3F/KPCOCDW0fG1OdfwFqw9j+nnEkaHGDQ6eqc=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Xy18ZPhFu1iZGnIGBxvwryfd0aHhwoVwrHVrBj5G56gK9dJeT8lOhrR2VTNALTee921dHZulkD1O0g8ZleIxInacpJIXE4RwiU6zwVaynJ/NzVFVLp9sqIm2dQpGFgtDbbycBKtdCoH+ulpw7vbwEugqZXH0V3xN0zDjG4hILTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=nLiwURvL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42CAvwvU021211; Tue, 12 Mar 2024 15:02:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=qXoAYhHKfTUJsSlgTVytqgymms4yVPOoUBmHB7FY+F0=; b=nL iwURvLXZXJMQX43Y0kLb4lxaEVl8xGwk4s2N7OzlDJttEtuNqvGVFCiH1DPAO6U1 HBi3VyogXhHLXifL1Cmq/2I6WApVFRuuJmymnrcM+NOL9+GmO14oHXBFAtc9B2Hj xB2xvLxuZnkvonoVIKfVHKnZt+GwIhzdISZcO80evlqsfviPU/SUuslxA+tpMgz4 7WZShHjlWT+cSutPJudqzJO/ZV4rG7Aw7oc4HAx84Zk9Yek4l7dfneQNjM8a/VGa 5sM5gtP+Bm3itHOc7h0lsfp3+/77HAqHZL5d9Aapkrp+fPEVVKVcmUzHFUhdJ78G Qolz6ktpyqu9s/UOn0xQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wtjef0xs3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 15:01:59 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42CF1wAS026791 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 15:01:58 GMT Received: from [10.251.45.43] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 12 Mar 2024 08:01:55 -0700 Message-ID: Date: Tue, 12 Mar 2024 17:01:53 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/9] media: qcom: camss: Add per sub-device type resources Content-Language: en-US To: Konrad Dybcio , , , , , CC: , , , , , References: <20240227122415.491-1-quic_grosikop@quicinc.com> <20240227122415.491-2-quic_grosikop@quicinc.com> <9af62237-98ec-4130-8523-f6c9cb0ad281@linaro.org> From: "Gjorgji Rosikopulos (Consultant)" In-Reply-To: <9af62237-98ec-4130-8523-f6c9cb0ad281@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: LGqLkHqDYaoPEJxN4hAgfQ_V7MvdLw0y X-Proofpoint-GUID: LGqLkHqDYaoPEJxN4hAgfQ_V7MvdLw0y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-12_10,2024-03-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403120115 Hi Konrad, Thank you for the review. On 3/12/2024 4:44 PM, Konrad Dybcio wrote: > > > On 2/27/24 13:24, Gjorgji Rosikopulos wrote: >> From: Radoslav Tsvetkov >> >> Currently resources structure grows with additional parameters >> required for >> each sub-deivce. However each sub-device has some specific resources or >> configurations which need to be passed during the initialization. >> >> This change adds per sub-device type structure to simplify the things >> and removes the magical void pointer to hw_ops. > > I'm not quite sure what the benefit here is, as opposed to simply > extending _device? > > Generally, I think the driver state as of today is somewhat backwards.. > > We define a common set of resources, and then assign them subdev-specific > ops, instead of defining the subdev and consuming clocks/pds/resets > within a subdevice there.. In the current code only ops are specific. However there are other configurations passed to the sub-devices which are actually specific to different sub-device, as an example: 1. is_lite flag. The lite flag is valid for csid and vfe but not for csiphy. 2. line_num this is valid only for vfe sub-device. 3. video device available formats. Those formats are only used by the vfe sub-device and are not valid to other sub-devices which are not having any video device connected, (those will be added in next patches in the patch-set). Please check the other changes in this patch-set maybe it will make more sense. I am not sure with such differences in the sub-device code we can have generic structure which contains only ops... And please note that when we are introducing new sub-device for other SoC it may need additional specific configuration. Regards, ~Gjorgji