From nobody Sun Jun 14 12:42:52 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 0D18D3EF653 for ; Thu, 2 Apr 2026 18:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154867; cv=none; b=RkDJORA9zNCJfGWpUTAOaJi/x3P0QpJQy3scWaVKgPEfHUmdo9ymTFPkTjJIWBaQpsepbhbB+GmLfzr86JLxg4oNmO14Gwns0M9PyKT03HJGXhC5J9Io2UbqncZBnqayMpLXZUSnsp1EMUqb3Z2yBPnFxIIy6LEa3kzJlaUnBOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154867; c=relaxed/simple; bh=wyq5W/u57ccvu5nuOwIucSKyF20x4rNLLNnxHJNFwaI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dsQ3EF196DUlVcL6OqkS+nqK0XN/fN6Tw3UabWr6afHq8/frUEW3r9316kcVnOoY1WztXPcZn+oIBSZfx5S8UfNoC16Nvqq5wxXmEG/AL5JNfN7pyWeRAZe3oHsTNZKi6ekKrNlbSHlpDbJ/kyuIk+gp8jzkgH621Les09ln6Xc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b41sDTQU; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b41sDTQU" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-48897fd88ebso1069855e9.2 for ; Thu, 02 Apr 2026 11:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775154861; x=1775759661; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+HPdsHvT9b8ErzkI6+gScL5hWU8x38ZFsJYEpzY5RL0=; b=b41sDTQU6uU59S6RPTpqwIe3+FhNPMSbc4ucUO+PGFbWPtMNNUnCwbgCwcRvjR0Ndc ENcEFmoCtYAD1POFlNb698j1jBfAjs36lwVHAm7AMSIqFXl9dykwpZb+yOGCr5vvcers LLqslZremkG1Xy1st2/HUn5HxjAWVZpjQzgyrbrE9jTf2UDAKeMwgmmF//XNAj3if2xJ KdTruIWz/hKShUqaAf8AhKIB/dHF/EH23/KhUz9gSq6zU5/VjP0gf4CQpBj3S2EWujCi 0jDUvHMVdxKKUUXU0mkupa+gmCdaFC2BydQv9zcUOUuawzJZ/ScaJ0l7WjFPe/yHeXhZ 5Ksg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775154861; x=1775759661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+HPdsHvT9b8ErzkI6+gScL5hWU8x38ZFsJYEpzY5RL0=; b=h3ITznoNJJxa6oOnaC+3KC/w8JbZz6Vbyggrz3GOPoDJEQHco5fn89+hOed/dxnGty cW7GaXyDzHTIbpz6TGwH+Smrgp0JAdQvy0bWyVCv1H86NgKqcfbCoNLpJI4hqQ9xCzYB E9iGGzyj5WdsI0zrn6eDaX0rTwgQURItg+b1ndQg6rtXVqFyzDaaTL/ssBDG/B1dmG3O KzDs3RPyghSY7fP7fZrnXAv2z1SFwSMeELRmukAFDnD4cbO+wkklZxc7x7lkoDP7e6eq CqFKRmp5gjqUNRmXG/llGXLi1815Fk/BSVzba0ZnkOGYHrFWVzalDKS8nvbuBU+eb5SH yxcw== X-Forwarded-Encrypted: i=1; AJvYcCX6eRjMhf9ds0YoEU0ihtWD2XkMQ7COZgw2CWg1MCexcPsc6lT331l/UzfDEMDomfuNFURicq0gustCrdQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxCxO75e9jnUj956nVg+nh9NvUQD3FpcQfgWPqquNvnP7qIcyLM C52BonKluyO8lYL5vg25+oEyoNg0twog+OVSRKQB9fw+uxvPahMpfOtS X-Gm-Gg: ATEYQzzZ7jfgzN0FTLwzANfbbunuxw6mGQ3+q8ZcxvkwMEENSY6S/nD4V0HBOnzd+5B OsgKbfc6FTvY1JhE4iF2kJLFxPyDUQ8DPvuv9roarcanAf6RsYJX6ac7kVz7Cz/fflRQKAU7pTJ KPe9BclQckapvZdW2mOyWVReN0nn+FVJ1RCiHKyRR6a9OMBkdkurldSEStP8rt47zoglfcS1tYk e1j5HaiWu5J2j86rDXGkCVQQiZ5dO5gNbgZBPTU11t5Ij5TCcpuBipaKwXCsb96YVDKLdG+YlL+ 486rEBQjCgpBG7/9dG9siW26qs9Hrsys+jvQqdjh+M73IvAIMYnk+SoLNw5hVHpbBLJfTgblaWT g3tnPiE9864eclQKXEHP4QyYUzGCXmbY8sLvv65QiijwU7mFyCIyaFer8AkCshxs5xMHOVRpYkn 2kVJmBfq5yNvOLu0mwBIFgTTrhIYIWRBx+5eM/F/pLqeavMm9lHB3wZpk= X-Received: by 2002:a05:600c:6286:b0:486:af22:4a2a with SMTP id 5b1f17b1804b1-488996dfebamr1784015e9.7.1775154860903; Thu, 02 Apr 2026 11:34:20 -0700 (PDT) Received: from localhost.localdomain ([2a00:f41:1cc5:ab9:2a0c:50ff:fe2f:36f4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e80a5e2sm205797825e9.1.2026.04.02.11.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 11:34:20 -0700 (PDT) From: "Jose A. Perez de Azpillaga" To: linux-staging@lists.linux.dev Cc: Andy Shevchenko , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v3 1/2] media: atomisp: gate ref and tnr frame config behind ISP enable flags Date: Thu, 2 Apr 2026 20:33:44 +0200 Message-ID: <20260402183402.444630-2-azpijr@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260402183402.444630-1-azpijr@gmail.com> References: <20260402183402.444630-1-azpijr@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The FIXME comment noted that delay_frames can be NULL for certain pipeline configurations, without knowing why. The reason is that when a binary does not enable ref_frame, delay frame allocation is intentionally skipped to save memory, leaving the pointers NULL by design. The ISP feature flags in binary->info->sp.enable accurately reflect which features are active for a given binary. Using enable.ref_frame and enable.tnr as the predicate for their respective configuration steps ensures the configuration path stays in sync with what was actually built into the pipeline Signed-off-by: Jose A. Perez de Azpillaga Reviewed-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/sh_css_sp.c | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/stagin= g/media/atomisp/pci/sh_css_sp.c index 6da151e7a873..abdffff41ae2 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_sp.c +++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c @@ -775,9 +775,13 @@ static int configure_isp_from_args(const struct sh_css= _sp_pipeline *pipeline, ret =3D ia_css_fpn_configure(binary, &binary->in_frame_info); if (ret) return ret; - ret =3D ia_css_crop_configure(binary, ia_css_frame_get_info(args->delay_f= rames[0])); - if (ret) - return ret; + + if (binary->info->sp.enable.ref_frame) { + ret =3D ia_css_crop_configure(binary, ia_css_frame_get_info(args->delay_= frames[0])); + if (ret) + return ret; + } + ret =3D ia_css_qplane_configure(pipeline, binary, &binary->in_frame_info); if (ret) return ret; @@ -807,22 +811,18 @@ static int configure_isp_from_args(const struct sh_cs= s_sp_pipeline *pipeline, if (ret) return ret; - /* - * FIXME: args->delay_frames can be NULL here - * - * Somehow, the driver at the Intel Atom Yocto tree doesn't seem to - * suffer from the same issue. - * - * Anyway, the function below should now handle a NULL delay_frames - * without crashing, but the pipeline should likely be built without - * adding it at the first place (or there are a hidden bug somewhere) - */ - ret =3D ia_css_ref_configure(binary, args->delay_frames, pipeline->dvs_fr= ame_delay); - if (ret) - return ret; - ret =3D ia_css_tnr_configure(binary, args->tnr_frames); - if (ret) - return ret; + if (binary->info->sp.enable.ref_frame) { + ret =3D ia_css_ref_configure(binary, args->delay_frames, pipeline->dvs_f= rame_delay); + if (ret) + return ret; + } + + if (binary->info->sp.enable.tnr) { + ret =3D ia_css_tnr_configure(binary, args->tnr_frames); + if (ret) + return ret; + } + return ia_css_bayer_io_config(binary, args); } -- 2.53.0 From nobody Sun Jun 14 12:42:52 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B2F03E8678 for ; Thu, 2 Apr 2026 18:34:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154869; cv=none; b=eLl5TMRkYpAWl1yow2DwfkNVwWxYwc2qHTUV+qBthSohGqi9JQcGV+azq9D3dsojqaNTpgoT7Sk+VAtUg2EkM4gRVWpdhIegsx796+LmtyhlKBLC0IvyBDSsMpBIMZ/NNR6+dM5bWa421/46YytVVW6UocqCmdJfexYKIyDX8i8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775154869; c=relaxed/simple; bh=CVvofp7Vg74mY4dHHHowldMJYz2mg2rj011qUi0dVn4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AvZSissDT+0yy2U+98xtE7U4AC5GFgWGhjG3hc3gNsBPX8xo9y1Wknhw2GO/Ggj/21Sh6KFYn84GIydb/C1AEd7LvbDxd00jAKkOF3he7JwmYUh6Mk9x25NaFrDeYcIwPhBW8yns3AqPYXSt7ByKHNR4Nz5obRCsOkm/Bi9XRAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Su3eYBMC; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Su3eYBMC" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4852b81c73aso11275125e9.3 for ; Thu, 02 Apr 2026 11:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775154865; x=1775759665; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e6esEg14STtARc9s+P9up1gj8wPgvzwV1KQLA/9K8XI=; b=Su3eYBMCax0gvhA9GUfG7BJT2ITBYCCyTdohhfPa4gtPvUBuHmyDOjorDQTnAhShhX +K1txJOqr41KvBFHLf4K3+KCTuOEdumrQfLda3MzxM9V0+NfnZX9zWwcpg9YnV6Puj4I 8C/35g4LaFLwEaiaXPQvaqI5l7PGGNPE1OSRz8ZvVNVaymFwYrPihQWJxwSh+TKpy9a8 NVq0giLTe+5vDoYV9fAFqTLgOIx08jfCm2fWO3qlXS5d8Exzru/z7gXRr+2nduyigIMC 3kYnFGLQPSpNW5WnHM2Zc5E79/6qHkj2zAWe4HmM4PN7kvxhwwnCghPPGw1AoNqXQ3nM zSCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775154865; x=1775759665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=e6esEg14STtARc9s+P9up1gj8wPgvzwV1KQLA/9K8XI=; b=kervf7jlBIyCVYP1qb9RUdaaLiHxsF3VIhIxGpCH3dAL3UJ9e6Sp47ciQUsCGMx/1/ lyywEykcBeDhGr6jEaLMJT3OLsxrgckfJi0xm04M1ay+stEbDSZjzI5iWWxpqdU5YELl 0E95MsDvuYMB5sng6DX8x0V9KVq2UyvhlA607djsoNKx5sFy4wpUrGeRfUWEyLo63xUr webL2ohpxkdnOcP+DLRUhu/e8QJkR3kI5J0ukqxZmAbrQu7X1vhnYA0PFyRZrEgsy2YK D11ZB9fHXHTZ0UNuqa0SJW0wn9CM6dqCxnYvQdFEGxag6Zp0GMb8hXMigvNc6qxZGTsD MyoQ== X-Forwarded-Encrypted: i=1; AJvYcCXoO5boF63SQoNxN/fhxAGmVH7M74SM8IR4WEXjB2tOsMDVGaOZgeXM5QJ3LsaApx1jmIJFTIC6SGyY64I=@vger.kernel.org X-Gm-Message-State: AOJu0YxgGndgOdvu7VFaxIl4GTMTWRypfaGD5THpqG1Egb+h/jAxl8+H Uq0xo7C2ysc1GTYwl2ULUVXE8aRhFpgbAX4yPE28PQXF/3/Uq61qfRan X-Gm-Gg: ATEYQzzp2XiJi7wf5j1YiNjrMI2CY9+J+9XoIEC3LdvHnv+XyKGqP58l2aOdEMq9n43 8+TuKJoth/3+pWORggFgtlEceHx/b10pbdKSmTjWJSsnpNMNijNEizkgWyqRm+KKwcHhE6v9RyA HcGx3nFxS72xrfZ1AiyQFtNu6VGsrEvyV4DluWEZOoHqdZLyHGsXpfSYF0ZPUMKpV30XIh5ArOB X+BiPI8Kyp+xZyssXdvCa5U4D31aiAlda7QgugP/n3UFxVFOrrW3GqRpVQFNTMD2ck7geLJyvVV 4lo+t52gliH64fCFBWKw4awmklgBHZJ1aB2WPktcIBnpYmoW8Pa/mpahcaO+NZTDLZ9pFA5EIKh 4Jy94zxGlZlSHUFQIplAgsgOZdsTi94IbjwDLKCtKEixPyNjFNw8VA5BdJKbtvYP0dxPSZIjWgS mY50l53ZLmyOZ+TE8eHio7ThVxuzzPm7Jl01bFdTWZOFj/ X-Received: by 2002:a05:600c:4e14:b0:485:3dfc:57c with SMTP id 5b1f17b1804b1-488997a44edmr1227295e9.21.1775154865307; Thu, 02 Apr 2026 11:34:25 -0700 (PDT) Received: from localhost.localdomain ([2a00:f41:1cc5:ab9:2a0c:50ff:fe2f:36f4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e80a5e2sm205797825e9.1.2026.04.02.11.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 11:34:24 -0700 (PDT) From: "Jose A. Perez de Azpillaga" To: linux-staging@lists.linux.dev Cc: Andy Shevchenko , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v3 2/2] media: atomisp: remove redundant call to ia_css_output0_configure() Date: Thu, 2 Apr 2026 20:33:45 +0200 Message-ID: <20260402183402.444630-3-azpijr@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260402183402.444630-1-azpijr@gmail.com> References: <20260402183402.444630-1-azpijr@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The function configure_isp_from_args() contained a duplicate call to ia_css_output0_configure() using the same output frame index. Remove the redundant call to simplify the configuration path. The ia_css_output0_configure() function acts as a configuration setter. It populates a struct ia_css_output0_configuration from the frame info and caches it in the binary parameters. Calling it twice with the same out_frame[0] pointer merely overwrites the exact same state with identical values. It has no cumulative state, neither does its order matter relative to ia_css_copy_output_configure(). Signed-off-by: Jose A. Perez de Azpillaga Reviewed-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/sh_css_sp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/stagin= g/media/atomisp/pci/sh_css_sp.c index abdffff41ae2..2beb7168517f 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_sp.c +++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c @@ -792,9 +792,6 @@ static int configure_isp_from_args(const struct sh_css_= sp_pipeline *pipeline, if (ret) return ret; ret =3D ia_css_copy_output_configure(binary, args->copy_output); - if (ret) - return ret; - ret =3D ia_css_output0_configure(binary, ia_css_frame_get_info(args->out_= frame[0])); if (ret) return ret; ret =3D ia_css_iterator_configure(binary, ia_css_frame_get_info(args->in_= frame)); -- 2.53.0