msm: camera: jpeg: Set no memory retention
Set the memory retention flags for certain hardware clocks to save power. Memory does not need to be retained for these clocks since the driver reinitializes the jpeg hardware whenever the clocks are turned on. CRs-Fixed: 1044373 Change-Id: Idd83064eaea2dee48b78a352a715633c04347217 Signed-off-by: Gautham Mayyuri <gmayyuri@codeaurora.org>
This commit is contained in:
parent
2c28d7f5d4
commit
4b2c1679b1
2 changed files with 29 additions and 0 deletions
|
@ -319,6 +319,7 @@ err_reg_enable:
|
|||
int msm_jpeg_platform_setup(struct msm_jpeg_device *pgmn_dev)
|
||||
{
|
||||
int rc = -1;
|
||||
int i;
|
||||
struct resource *jpeg_irq_res;
|
||||
void *jpeg_base, *vbif_base;
|
||||
struct platform_device *pdev = pgmn_dev->pdev;
|
||||
|
@ -356,6 +357,19 @@ int msm_jpeg_platform_setup(struct msm_jpeg_device *pgmn_dev)
|
|||
goto err_jpeg_clk;
|
||||
}
|
||||
|
||||
/*set memcore and mem periphery logic flags to 0*/
|
||||
for (i = 0; i < pgmn_dev->num_clk; i++) {
|
||||
if ((strcmp(pgmn_dev->jpeg_clk_info[i].clk_name,
|
||||
"core_clk") == 0) ||
|
||||
(strcmp(pgmn_dev->jpeg_clk_info[i].clk_name,
|
||||
"mmss_camss_jpeg_axi_clk") == 0)) {
|
||||
msm_camera_set_clk_flags(pgmn_dev->jpeg_clk[i],
|
||||
CLKFLAG_NORETAIN_MEM);
|
||||
msm_camera_set_clk_flags(pgmn_dev->jpeg_clk[i],
|
||||
CLKFLAG_NORETAIN_PERIPH);
|
||||
}
|
||||
}
|
||||
|
||||
/* get all the regulators information */
|
||||
rc = msm_camera_get_regulator_info(pdev, &pgmn_dev->jpeg_vdd,
|
||||
&pgmn_dev->num_reg);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <media/videobuf2-core.h>
|
||||
#include <media/v4l2-mem2mem.h>
|
||||
#include <media/msm_jpeg_dma.h>
|
||||
#include <linux/clk/msm-clk.h>
|
||||
|
||||
#include "msm_jpeg_dma_dev.h"
|
||||
#include "msm_jpeg_dma_hw.h"
|
||||
|
@ -1258,6 +1259,7 @@ static int jpegdma_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct msm_jpegdma_device *jpegdma;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
dev_dbg(&pdev->dev, "jpeg v4l2 DMA probed\n");
|
||||
/* Jpeg dma device struct */
|
||||
|
@ -1293,6 +1295,19 @@ static int jpegdma_probe(struct platform_device *pdev)
|
|||
if (ret < 0)
|
||||
goto error_get_clocks;
|
||||
|
||||
/*set memcore and mem periphery logic flags to 0*/
|
||||
for (i = 0; i < jpegdma->num_clk; i++) {
|
||||
if ((strcmp(jpegdma->jpeg_clk_info[i].clk_name,
|
||||
"core_clk") == 0) ||
|
||||
(strcmp(jpegdma->jpeg_clk_info[i].clk_name,
|
||||
"mmss_camss_jpeg_axi_clk") == 0)) {
|
||||
msm_camera_set_clk_flags(jpegdma->clk[i],
|
||||
CLKFLAG_NORETAIN_MEM);
|
||||
msm_camera_set_clk_flags(jpegdma->clk[i],
|
||||
CLKFLAG_NORETAIN_PERIPH);
|
||||
}
|
||||
}
|
||||
|
||||
ret = msm_jpegdma_hw_get_qos(jpegdma);
|
||||
if (ret < 0)
|
||||
goto error_qos_get;
|
||||
|
|
Loading…
Add table
Reference in a new issue