Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm: dpu: Remove 'inline' from several functions

Per chapter 15 of coding-style, removing 'inline' keyword from functions
that are larger than a typical macro. In a couple of cases I've
simplified the function and kept the inline.

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Sean Paul and committed by
Rob Clark
58fba464 bf711751

+29 -47
+1 -1
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
··· 53 53 return mode->hdisplay / cstate->num_mixers; 54 54 } 55 55 56 - static inline struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc) 56 + static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc) 57 57 { 58 58 struct msm_drm_private *priv = crtc->dev->dev_private; 59 59
+2 -14
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
··· 264 264 */ 265 265 static inline int dpu_crtc_frame_pending(struct drm_crtc *crtc) 266 266 { 267 - struct dpu_crtc *dpu_crtc; 268 - 269 - if (!crtc) 270 - return -EINVAL; 271 - 272 - dpu_crtc = to_dpu_crtc(crtc); 273 - return atomic_read(&dpu_crtc->frame_pending); 267 + return crtc ? atomic_read(&to_dpu_crtc(crtc)->frame_pending) : -EINVAL; 274 268 } 275 269 276 270 /** ··· 321 327 static inline enum dpu_crtc_client_type dpu_crtc_get_client_type( 322 328 struct drm_crtc *crtc) 323 329 { 324 - struct dpu_crtc_state *cstate = 325 - crtc ? to_dpu_crtc_state(crtc->state) : NULL; 326 - 327 - if (!cstate) 328 - return NRT_CLIENT; 329 - 330 - return RT_CLIENT; 330 + return crtc && crtc->state ? RT_CLIENT : NRT_CLIENT; 331 331 } 332 332 333 333 /**
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
··· 1374 1374 * phys: Pointer to physical encoder structure 1375 1375 * extra_flush_bits: Additional bit mask to include in flush trigger 1376 1376 */ 1377 - static inline void _dpu_encoder_trigger_flush(struct drm_encoder *drm_enc, 1377 + static void _dpu_encoder_trigger_flush(struct drm_encoder *drm_enc, 1378 1378 struct dpu_encoder_phys *phys, uint32_t extra_flush_bits) 1379 1379 { 1380 1380 struct dpu_hw_ctl *ctl; ··· 1417 1417 * _dpu_encoder_trigger_start - trigger start for a physical encoder 1418 1418 * phys: Pointer to physical encoder structure 1419 1419 */ 1420 - static inline void _dpu_encoder_trigger_start(struct dpu_encoder_phys *phys) 1420 + static void _dpu_encoder_trigger_start(struct dpu_encoder_phys *phys) 1421 1421 { 1422 1422 if (!phys) { 1423 1423 DPU_ERROR("invalid argument(s)\n");
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
··· 110 110 */ 111 111 } 112 112 113 - static inline u32 get_horizontal_total(const struct intf_timing_params *timing) 113 + static u32 get_horizontal_total(const struct intf_timing_params *timing) 114 114 { 115 115 u32 active = timing->xres; 116 116 u32 inactive = ··· 119 119 return active + inactive; 120 120 } 121 121 122 - static inline u32 get_vertical_total(const struct intf_timing_params *timing) 122 + static u32 get_vertical_total(const struct intf_timing_params *timing) 123 123 { 124 124 u32 active = timing->yres; 125 125 u32 inactive =
+3 -3
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
··· 124 124 DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, ctx->pending_flush_mask); 125 125 } 126 126 127 - static inline uint32_t dpu_hw_ctl_get_bitmask_sspp(struct dpu_hw_ctl *ctx, 127 + static uint32_t dpu_hw_ctl_get_bitmask_sspp(struct dpu_hw_ctl *ctx, 128 128 enum dpu_sspp sspp) 129 129 { 130 130 uint32_t flushbits = 0; ··· 179 179 return flushbits; 180 180 } 181 181 182 - static inline uint32_t dpu_hw_ctl_get_bitmask_mixer(struct dpu_hw_ctl *ctx, 182 + static uint32_t dpu_hw_ctl_get_bitmask_mixer(struct dpu_hw_ctl *ctx, 183 183 enum dpu_lm lm) 184 184 { 185 185 uint32_t flushbits = 0; ··· 212 212 return flushbits; 213 213 } 214 214 215 - static inline int dpu_hw_ctl_get_bitmask_intf(struct dpu_hw_ctl *ctx, 215 + static int dpu_hw_ctl_get_bitmask_intf(struct dpu_hw_ctl *ctx, 216 216 u32 *flushbits, enum dpu_intf intf) 217 217 { 218 218 switch (intf) {
+3 -9
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
··· 64 64 static inline int _stage_offset(struct dpu_hw_mixer *ctx, enum dpu_stage stage) 65 65 { 66 66 const struct dpu_lm_sub_blks *sblk = ctx->cap->sblk; 67 - int rc; 67 + if (stage != DPU_STAGE_BASE && stage <= sblk->maxblendstages) 68 + return sblk->blendstage_base[stage - DPU_STAGE_0]; 68 69 69 - if (stage == DPU_STAGE_BASE) 70 - rc = -EINVAL; 71 - else if (stage <= sblk->maxblendstages) 72 - rc = sblk->blendstage_base[stage - DPU_STAGE_0]; 73 - else 74 - rc = -EINVAL; 75 - 76 - return rc; 70 + return -EINVAL; 77 71 } 78 72 79 73 static void dpu_hw_lm_setup_out(struct dpu_hw_mixer *ctx,
+1 -1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
··· 141 141 /* traffic shaper clock in Hz */ 142 142 #define TS_CLK 19200000 143 143 144 - static inline int _sspp_subblk_offset(struct dpu_hw_pipe *ctx, 144 + static int _sspp_subblk_offset(struct dpu_hw_pipe *ctx, 145 145 int s_id, 146 146 u32 *idx) 147 147 {
+3 -3
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
··· 137 137 * @src_wdith: width of source buffer 138 138 * Return: fill level corresponding to the source buffer/format or 0 if error 139 139 */ 140 - static inline int _dpu_plane_calc_fill_level(struct drm_plane *plane, 140 + static int _dpu_plane_calc_fill_level(struct drm_plane *plane, 141 141 const struct dpu_format *fmt, u32 src_width) 142 142 { 143 143 struct dpu_plane *pdpu, *tmp; ··· 441 441 return kms->base.aspace; 442 442 } 443 443 444 - static inline void _dpu_plane_set_scanout(struct drm_plane *plane, 444 + static void _dpu_plane_set_scanout(struct drm_plane *plane, 445 445 struct dpu_plane_state *pstate, 446 446 struct dpu_hw_pipe_cfg *pipe_cfg, 447 447 struct drm_framebuffer *fb) ··· 525 525 scale_cfg->enable = 1; 526 526 } 527 527 528 - static inline void _dpu_plane_setup_csc(struct dpu_plane *pdpu) 528 + static void _dpu_plane_setup_csc(struct dpu_plane *pdpu) 529 529 { 530 530 static const struct dpu_csc_cfg dpu_csc_YUV2RGB_601L = { 531 531 {
+12 -12
drivers/gpu/drm/msm/disp/dpu1/msm_media_info.h
··· 820 820 * Progressive: width 821 821 * Interlaced: width 822 822 */ 823 - static inline unsigned int VENUS_Y_STRIDE(int color_fmt, int width) 823 + static unsigned int VENUS_Y_STRIDE(int color_fmt, int width) 824 824 { 825 825 unsigned int alignment, stride = 0; 826 826 ··· 862 862 * Progressive: width 863 863 * Interlaced: width 864 864 */ 865 - static inline unsigned int VENUS_UV_STRIDE(int color_fmt, int width) 865 + static unsigned int VENUS_UV_STRIDE(int color_fmt, int width) 866 866 { 867 867 unsigned int alignment, stride = 0; 868 868 ··· 904 904 * Progressive: height 905 905 * Interlaced: (height+1)>>1 906 906 */ 907 - static inline unsigned int VENUS_Y_SCANLINES(int color_fmt, int height) 907 + static unsigned int VENUS_Y_SCANLINES(int color_fmt, int height) 908 908 { 909 909 unsigned int alignment, sclines = 0; 910 910 ··· 938 938 * Progressive: height 939 939 * Interlaced: (height+1)>>1 940 940 */ 941 - static inline unsigned int VENUS_UV_SCANLINES(int color_fmt, int height) 941 + static unsigned int VENUS_UV_SCANLINES(int color_fmt, int height) 942 942 { 943 943 unsigned int alignment, sclines = 0; 944 944 ··· 974 974 * Progressive: width 975 975 * Interlaced: width 976 976 */ 977 - static inline unsigned int VENUS_Y_META_STRIDE(int color_fmt, int width) 977 + static unsigned int VENUS_Y_META_STRIDE(int color_fmt, int width) 978 978 { 979 979 int y_tile_width = 0, y_meta_stride = 0; 980 980 ··· 1007 1007 * Progressive: height 1008 1008 * Interlaced: (height+1)>>1 1009 1009 */ 1010 - static inline unsigned int VENUS_Y_META_SCANLINES(int color_fmt, int height) 1010 + static unsigned int VENUS_Y_META_SCANLINES(int color_fmt, int height) 1011 1011 { 1012 1012 int y_tile_height = 0, y_meta_scanlines = 0; 1013 1013 ··· 1040 1040 * Progressive: width 1041 1041 * Interlaced: width 1042 1042 */ 1043 - static inline unsigned int VENUS_UV_META_STRIDE(int color_fmt, int width) 1043 + static unsigned int VENUS_UV_META_STRIDE(int color_fmt, int width) 1044 1044 { 1045 1045 int uv_tile_width = 0, uv_meta_stride = 0; 1046 1046 ··· 1073 1073 * Progressive: height 1074 1074 * Interlaced: (height+1)>>1 1075 1075 */ 1076 - static inline unsigned int VENUS_UV_META_SCANLINES(int color_fmt, int height) 1076 + static unsigned int VENUS_UV_META_SCANLINES(int color_fmt, int height) 1077 1077 { 1078 1078 int uv_tile_height = 0, uv_meta_scanlines = 0; 1079 1079 ··· 1099 1099 return uv_meta_scanlines; 1100 1100 } 1101 1101 1102 - static inline unsigned int VENUS_RGB_STRIDE(int color_fmt, int width) 1102 + static unsigned int VENUS_RGB_STRIDE(int color_fmt, int width) 1103 1103 { 1104 1104 unsigned int alignment = 0, stride = 0, bpp = 4; 1105 1105 ··· 1128 1128 return stride; 1129 1129 } 1130 1130 1131 - static inline unsigned int VENUS_RGB_SCANLINES(int color_fmt, int height) 1131 + static unsigned int VENUS_RGB_SCANLINES(int color_fmt, int height) 1132 1132 { 1133 1133 unsigned int alignment = 0, scanlines = 0; 1134 1134 ··· 1154 1154 return scanlines; 1155 1155 } 1156 1156 1157 - static inline unsigned int VENUS_RGB_META_STRIDE(int color_fmt, int width) 1157 + static unsigned int VENUS_RGB_META_STRIDE(int color_fmt, int width) 1158 1158 { 1159 1159 int rgb_tile_width = 0, rgb_meta_stride = 0; 1160 1160 ··· 1178 1178 return rgb_meta_stride; 1179 1179 } 1180 1180 1181 - static inline unsigned int VENUS_RGB_META_SCANLINES(int color_fmt, int height) 1181 + static unsigned int VENUS_RGB_META_SCANLINES(int color_fmt, int height) 1182 1182 { 1183 1183 int rgb_tile_height = 0, rgb_meta_scanlines = 0; 1184 1184