vs = fetchdecode_get_vscaler(fd);
layerblend_pixengcfg_clken(lb, CLKEN__DISABLE);
- fetchdecode_layerproperty(fd, false);
+ fetchdecode_source_buffer_disable(fd);
hscaler_pixengcfg_clken(hs, CLKEN__DISABLE);
vscaler_pixengcfg_clken(vs, CLKEN__DISABLE);
hscaler_mode(hs, SCALER_NEUTRAL);
fetchdecode_source_stride(fd, fb->pitches[0]);
fetchdecode_src_buf_dimensions(fd, src_w, src_h);
fetchdecode_set_fmt(fd, fb->pixel_format);
- fetchdecode_layerproperty(fd, true);
+ fetchdecode_source_buffer_enable(fd);
fetchdecode_framedimensions(fd, src_w, src_h);
fetchdecode_baseaddress(fd, drm_plane_state_to_baseaddr(state));
fetchdecode_set_stream_id(fd, dplane->stream_id ?
}
EXPORT_SYMBOL_GPL(fetchdecode_clipoffset);
-void fetchdecode_layerproperty(struct dpu_fetchdecode *fd, bool enable)
+void fetchdecode_source_buffer_enable(struct dpu_fetchdecode *fd)
{
u32 val;
- if (enable)
- val = SOURCEBUFFERENABLE;
- else
- val = 0;
+ mutex_lock(&fd->mutex);
+ val = dpu_fd_read(fd, LAYERPROPERTY0);
+ val |= SOURCEBUFFERENABLE;
+ dpu_fd_write(fd, val, LAYERPROPERTY0);
+ mutex_unlock(&fd->mutex);
+}
+EXPORT_SYMBOL_GPL(fetchdecode_source_buffer_enable);
+
+void fetchdecode_source_buffer_disable(struct dpu_fetchdecode *fd)
+{
+ u32 val;
mutex_lock(&fd->mutex);
+ val = dpu_fd_read(fd, LAYERPROPERTY0);
+ val &= ~SOURCEBUFFERENABLE;
dpu_fd_write(fd, val, LAYERPROPERTY0);
mutex_unlock(&fd->mutex);
}
-EXPORT_SYMBOL_GPL(fetchdecode_layerproperty);
+EXPORT_SYMBOL_GPL(fetchdecode_source_buffer_disable);
bool fetchdecode_is_enabled(struct dpu_fetchdecode *fd)
{
unsigned int y);
void fetchdecode_clipdimensions(struct dpu_fetchdecode *fd, unsigned int w,
unsigned int h);
-void fetchdecode_layerproperty(struct dpu_fetchdecode *fd, bool enable);
+void fetchdecode_source_buffer_enable(struct dpu_fetchdecode *fd);
+void fetchdecode_source_buffer_disable(struct dpu_fetchdecode *fd);
bool fetchdecode_is_enabled(struct dpu_fetchdecode *fd);
void fetchdecode_framedimensions(struct dpu_fetchdecode *fd, unsigned int w,
unsigned int h);