[03/30] libcamera: software_isp: gpu: rename debayerGPU to processGPU
diff mbox series

Message ID 20260618122245.946138-4-bryan.odonoghue@linaro.org
State RFC
Headers show
Series
  • RFC/RFT: gpuisp: Multipass with speed optimisations on top
Related show

Commit Message

Bryan O'Donoghue June 18, 2026, 12:22 p.m. UTC
This function will do more than debayer, rename it to reflect.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 4 ++--
 src/libcamera/software_isp/software_isp_pipeline_gpu.h   | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Milan Zamazal June 22, 2026, 6:19 p.m. UTC | #1
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:

> This function will do more than debayer, rename it to reflect.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 4 ++--
>  src/libcamera/software_isp/software_isp_pipeline_gpu.h   | 3 ++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> index c68a04fff..6f988d672 100644
> --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> @@ -511,7 +511,7 @@ void SoftwareIspPipelineGpu::setShaderVariableValues(const DebayerParams &params
>  	return;
>  }
>  
> -int SoftwareIspPipelineGpu::debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
> +int SoftwareIspPipelineGpu::processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
>  {
>  	bool dmabuf_import_succeeded = false;
>  
> @@ -569,7 +569,7 @@ void SoftwareIspPipelineGpu::process(uint32_t frame, FrameBuffer *input, FrameBu
>  	std::optional<MappedFrameBuffer> inMapped;
>  	std::optional<DmaSyncer> inDmaSyncer;
>  
> -	if (debayerGPU(input, output, params, &inMapped, &inDmaSyncer)) {
> +	if (processGPU(input, output, params, &inMapped, &inDmaSyncer)) {
>  		LOG(Debayer, Error) << "debayerGPU failed";
>  		goto error;
>  	}
> diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> index 6f161e063..f0515d889 100644
> --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> @@ -65,7 +65,8 @@ private:
>  	int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);
>  	int getShaderVariableLocations();
>  	void setShaderVariableValues(const DebayerParams &params);
> -	int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
> +	int processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
> +	void configureTexture(GLuint &texture);

What's this line -- placed into a wrong commit?

With this fixed:

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

>  	/* Shader program identifiers */
>  	GLuint vertexShaderId_ = 0;
Kieran Bingham June 22, 2026, 6:44 p.m. UTC | #2
Quoting Milan Zamazal (2026-06-22 19:19:56)
> Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:
> 
> > This function will do more than debayer, rename it to reflect.
> >
> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > ---
> >  src/libcamera/software_isp/software_isp_pipeline_gpu.cpp | 4 ++--
> >  src/libcamera/software_isp/software_isp_pipeline_gpu.h   | 3 ++-
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> > index c68a04fff..6f988d672 100644
> > --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> > +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
> > @@ -511,7 +511,7 @@ void SoftwareIspPipelineGpu::setShaderVariableValues(const DebayerParams &params
> >       return;
> >  }
> >  
> > -int SoftwareIspPipelineGpu::debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
> > +int SoftwareIspPipelineGpu::processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
> >  {
> >       bool dmabuf_import_succeeded = false;
> >  
> > @@ -569,7 +569,7 @@ void SoftwareIspPipelineGpu::process(uint32_t frame, FrameBuffer *input, FrameBu
> >       std::optional<MappedFrameBuffer> inMapped;
> >       std::optional<DmaSyncer> inDmaSyncer;
> >  
> > -     if (debayerGPU(input, output, params, &inMapped, &inDmaSyncer)) {
> > +     if (processGPU(input, output, params, &inMapped, &inDmaSyncer)) {

Calling processX() during process() sounds good to me.

> >               LOG(Debayer, Error) << "debayerGPU failed";
> >               goto error;
> >       }
> > diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> > index 6f161e063..f0515d889 100644
> > --- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> > +++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
> > @@ -65,7 +65,8 @@ private:
> >       int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);
> >       int getShaderVariableLocations();
> >       void setShaderVariableValues(const DebayerParams &params);
> > -     int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
> > +     int processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
> > +     void configureTexture(GLuint &texture);
> 
> What's this line -- placed into a wrong commit?
> 
> With this fixed:
> 
> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

And also this:

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> >       /* Shader program identifiers */
> >       GLuint vertexShaderId_ = 0;
>

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
index c68a04fff..6f988d672 100644
--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp
@@ -511,7 +511,7 @@  void SoftwareIspPipelineGpu::setShaderVariableValues(const DebayerParams &params
 	return;
 }
 
-int SoftwareIspPipelineGpu::debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
+int SoftwareIspPipelineGpu::processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)
 {
 	bool dmabuf_import_succeeded = false;
 
@@ -569,7 +569,7 @@  void SoftwareIspPipelineGpu::process(uint32_t frame, FrameBuffer *input, FrameBu
 	std::optional<MappedFrameBuffer> inMapped;
 	std::optional<DmaSyncer> inDmaSyncer;
 
-	if (debayerGPU(input, output, params, &inMapped, &inDmaSyncer)) {
+	if (processGPU(input, output, params, &inMapped, &inDmaSyncer)) {
 		LOG(Debayer, Error) << "debayerGPU failed";
 		goto error;
 	}
diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
index 6f161e063..f0515d889 100644
--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h
+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h
@@ -65,7 +65,8 @@  private:
 	int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);
 	int getShaderVariableLocations();
 	void setShaderVariableValues(const DebayerParams &params);
-	int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
+	int processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
+	void configureTexture(GLuint &texture);
 
 	/* Shader program identifiers */
 	GLuint vertexShaderId_ = 0;