Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2379070rwi; Tue, 1 Nov 2022 07:08:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FrZ/kxXAdUrlMw98EHyBDqKwpQr615+70fJeSog8Oh3n4RPn68CTLyfOyC7TPhROc5UAQ X-Received: by 2002:a63:1765:0:b0:457:8091:1b6c with SMTP id 37-20020a631765000000b0045780911b6cmr17070947pgx.208.1667311698906; Tue, 01 Nov 2022 07:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667311698; cv=none; d=google.com; s=arc-20160816; b=hlIfOh2sEt0xba8rxCgp7J5AJeBs8beiJuINmAkKPbwS5UicZjyzwoCuYFAyaIT60h s7wsoLRirh1iXCGGZy2cKlgvyfkXaHO2mX20N0bUarC+0vVOExU4SuuWZHcdhS+AM7st pe5bmC2Q4KoA/RDOdzngGs421iOd3QEA6Un1p4xwgMRu85Y47GRqSYfHsw1Z+liWHLWc eE0K4rPBjUbkypcNN4GHCGXes7ypbuAqg3RArF07PGnqIXdmlYxOl86GDHBFcBVSkLQn +9tyO3z/+LogSFD5BpF6F+gNE9v8xrf2m0+8cmFQIiQGcupxzjEPg4sNb5weT/G5KDMB cGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TuQrcuKYSmxbYTgmez/0o7iIQmKrnxkqsQehv9iqJF8=; b=wQQSlzCY7C134TnMcDW67GIWeVFujKYmr0SaWFnlECPnR54hONKXB6uuQ6qLA4YNvP 32InSvQmE8xuX+GQKwwX6b/pI6t01TfksbpMulmP8uOdsKW/t051kzLR4FHTk2SnIYk8 ODx+7cCPBj3g0+r7cQpY1rEqf1YYF0t/stHjHZzoIJdomOGY+BUudguoJMQi88Qg7ucA QUy80CFHaLCGOa4EdOiOQGUl55g0Itv40tXkucspFKPzyfwmoovLPqoTq7iv6k9xbkKQ RjURZYBzpG2MHpZWUBe6EsWB7/MOZnsXZw7mBQJIF73GVxFcyaN6/NOIdTnhzIXSZMcH UAAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q7uEqFoL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 82-20020a630255000000b00461f10556b9si12528276pgc.319.2022.11.01.07.08.06; Tue, 01 Nov 2022 07:08:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q7uEqFoL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbiKAN3B (ORCPT + 96 others); Tue, 1 Nov 2022 09:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbiKAN2y (ORCPT ); Tue, 1 Nov 2022 09:28:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BB9A12AB8 for ; Tue, 1 Nov 2022 06:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667309279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TuQrcuKYSmxbYTgmez/0o7iIQmKrnxkqsQehv9iqJF8=; b=Q7uEqFoLsYkIORzpW4ZncCGFgDlbRGQQr3gQ0DEENErrFXSIIFJmIvAlUb+mgwVHXrOMAI b8fRGxYbxADF6JwkPJRwMjzWFpW8GndY+pxBJNvfECSSct71tb5c2RkdbEEdziMTkk5lrI cQ/+NImFqq5ksmRCZ4LKHVFAJrZH5Bw= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-191-rAoqkXJoOe6RizEPpoNDVw-1; Tue, 01 Nov 2022 09:27:56 -0400 X-MC-Unique: rAoqkXJoOe6RizEPpoNDVw-1 Received: by mail-ej1-f71.google.com with SMTP id hq18-20020a1709073f1200b007ade8dd3494so1620511ejc.2 for ; Tue, 01 Nov 2022 06:27:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TuQrcuKYSmxbYTgmez/0o7iIQmKrnxkqsQehv9iqJF8=; b=mwXoal3OkBxiO983wNHJt6Xi7aU+iGg00GXA1yJLOPIRjd4xv4KPoE08TUjL5faW3z 2fEeIGujs+DD1W+Rb4J3jx1ZilPErDxQrFiOR/CVmszHphQVkwObYu2uxAw1rsBrLi7W XLTBQVDS66bGxwKLxmODrerzzmzW94XUCitm5zYAI2mmyT8/rzskmzF0YzrZvrJQB7kq //uxMfzutK9ljupUlGBpjaCUjT8JuW0ZXTX44+w5C2oQqb259k+ImcOdDL8HorOzou7e cBADLLmViYan6m33JnRUx1ZR3VXyhi445gc8h7OJWLmpgWUlWEsKhW0nsTLUFlZPvczn f1CQ== X-Gm-Message-State: ACrzQf0SUXg71FWu6y11EicRkFKBEAGlOZXoWldRlScAhRPiC9yWSHVL fFjqALzbMZxXwohX7a890Jq8+IEceBIGo5GrL7yT/D56QlsYMbVOkk46pVmoMA8G8Mu8pQvq/c3 ueieU67vyvqtRuL+A3h8FJu6E X-Received: by 2002:a17:907:da5:b0:7ad:7e95:6513 with SMTP id go37-20020a1709070da500b007ad7e956513mr18872136ejc.442.1667309275372; Tue, 01 Nov 2022 06:27:55 -0700 (PDT) X-Received: by 2002:a17:907:da5:b0:7ad:7e95:6513 with SMTP id go37-20020a1709070da500b007ad7e956513mr18872125ejc.442.1667309275190; Tue, 01 Nov 2022 06:27:55 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id v27-20020aa7cd5b000000b00458898fe90asm4554226edw.5.2022.11.01.06.27.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 06:27:54 -0700 (PDT) Message-ID: <48a28601-a3eb-8735-6a15-34436dcbd73e@redhat.com> Date: Tue, 1 Nov 2022 14:27:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH AUTOSEL 6.0 15/34] media: atomisp-ov2680: Fix ov2680_set_fmt() Content-Language: en-US, nl To: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andy Shevchenko , Mauro Carvalho Chehab , gregkh@linuxfoundation.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev References: <20221101112726.799368-1-sashal@kernel.org> <20221101112726.799368-15-sashal@kernel.org> From: Hans de Goede In-Reply-To: <20221101112726.799368-15-sashal@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sasha, I have no specific objections against the backporting of this and other atomisp related patches. But in general the atomisp driver is not yet in a state where it is ready to be used by normal users. Progress is being made but atm I don't really expect normal users to have it enabled / in active use. As such I'm also not sure if there is much value in backporting atomisp changes to the stable series. I don't know if you have a way to opt out certain drivers / file-paths from stable series backporting, but if you do you may want to consider opting out everything under: drivers/staging/media/atomisp/ As said above I don't think doing the backports offers much (if any) value to end users and I assume it does take you some time, so opting this path out might be better. Also given the fragile state of atomisp support atm it is hard to say for me if partially backporting some of the changes won't break the driver. Regards, Hans On 11/1/22 12:27, Sasha Levin wrote: > From: Hans de Goede > > [ Upstream commit adea153b4f6537f367fe77abada263fde8a1f7b6 ] > > On sets actually store the set (closest) format inside ov2680_device.dev, > so that it also properly gets returned by get_fmt. > > This fixes the following problem: > > 1. App does an VIDIOC_SET_FMT 640x480, calling ov2680_set_fmt() > 2. Internal buffers (atomisp_create_pipes_stream()) get allocated > at 640x480 size by atomisp_set_fmt() > 3. ov2680_get_fmt() gets called later on and returns 1600x1200 > since ov2680_device.dev was not updated. So things get configured > to stream at 1600x1200, but the internal buffers created during > atomisp_create_pipes_stream() do not get updated in size > 4. streaming starts, internal buffers overflow and the entire > machine freezes eventually due to memory being corrupted > > Reviewed-by: Andy Shevchenko > Signed-off-by: Hans de Goede > Signed-off-by: Mauro Carvalho Chehab > Signed-off-by: Sasha Levin > --- > drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c > index 4ba99c660681..ab52e35266bb 100644 > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c > @@ -894,11 +894,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd, > if (v_flag) > ov2680_v_flip(sd, v_flag); > > - /* > - * ret = startup(sd); > - * if (ret) > - * dev_err(&client->dev, "ov2680 startup err\n"); > - */ > + dev->res = res; > err: > mutex_unlock(&dev->input_lock); > return ret;