summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
diff options
context:
space:
mode:
authorMarijn Suijten <marijn.suijten@somainline.org>2023-04-26 01:11:11 +0200
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2023-05-22 10:14:16 +0300
commitbabdb815ef04572a940e78e533d7e90fc505b77f (patch)
treebdc1ebac1afbccbb96a494df2e0abac760ab57f8 /drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
parent94fdd55b93b46fcd6bc8415ad15b008b45031b1b (diff)
downloadlinux-stable-babdb815ef04572a940e78e533d7e90fc505b77f.tar.gz
linux-stable-babdb815ef04572a940e78e533d7e90fc505b77f.tar.bz2
linux-stable-babdb815ef04572a940e78e533d7e90fc505b77f.zip
drm/msm/dpu: Pass catalog pointers in RM to replace for-loop ID lookups
The Resource Manager already iterates over all available blocks from the catalog, only to pass their ID to a dpu_hw_xxx_init() function which uses an _xxx_offset() helper to search for and find the exact same catalog pointer again to initialize the block with, fallible error handling and all. Instead, pass const pointers to the catalog entries directly to these _init functions and drop the for loops entirely, saving on both readability complexity and unnecessary cycles at boot. Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/533861/ Link: https://lore.kernel.org/r/20230418-dpu-drop-useless-for-lookup-v3-3-e8d869eea455@somainline.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h')
-rw-r--r--drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
index b91923f879f1..e4f85409c624 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h
@@ -92,14 +92,13 @@ struct dpu_hw_wb {
};
/**
- * dpu_hw_wb_init(): Initializes and return writeback hw driver object.
- * @idx: wb_path index for which driver object is required
+ * dpu_hw_wb_init() - Initializes the writeback hw driver object.
+ * @cfg: wb_path catalog entry for which driver object is required
* @addr: mapped register io address of MDP
- * @m : pointer to mdss catalog data
+ * Return: Error code or allocated dpu_hw_wb context
*/
-struct dpu_hw_wb *dpu_hw_wb_init(enum dpu_wb idx,
- void __iomem *addr,
- const struct dpu_mdss_cfg *m);
+struct dpu_hw_wb *dpu_hw_wb_init(const struct dpu_wb_cfg *cfg,
+ void __iomem *addr);
/**
* dpu_hw_wb_destroy(): Destroy writeback hw driver object.