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

media: staging: rkisp1: uapi: remove __packed

The driver access struct's fields one by one, they are not blindly
copied to/from the hardware, so we can remove __packed from the
structs.

Tested on Scarlet Chromebook with ChromeOS stack and verified images
with the Camera app.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Helen Koike and committed by
Mauro Carvalho Chehab
d7a81a5b 581214d3

+38 -38
+38 -38
drivers/staging/media/rkisp1/uapi/rkisp1-config.h
··· 186 186 __u16 v_offs; 187 187 __u16 h_size; 188 188 __u16 v_size; 189 - } __packed; 189 + }; 190 190 191 191 /** 192 192 * struct rkisp1_cif_isp_bls_fixed_val - BLS fixed subtraction values ··· 204 204 __s16 gr; 205 205 __s16 gb; 206 206 __s16 b; 207 - } __packed; 207 + }; 208 208 209 209 /** 210 210 * struct rkisp1_cif_isp_bls_config - Configuration used by black level subtraction ··· 226 226 struct rkisp1_cif_isp_window bls_window2; 227 227 __u8 bls_samples; 228 228 struct rkisp1_cif_isp_bls_fixed_val fixed_val; 229 - } __packed; 229 + }; 230 230 231 231 /** 232 232 * struct rkisp1_cif_isp_dpcc_methods_config - Methods Configuration used by DPCC ··· 247 247 __u32 pg_fac; 248 248 __u32 rnd_thresh; 249 249 __u32 rg_fac; 250 - } __packed; 250 + }; 251 251 252 252 /** 253 253 * struct rkisp1_cif_isp_dpcc_config - Configuration used by DPCC ··· 268 268 struct rkisp1_cif_isp_dpcc_methods_config methods[RKISP1_CIF_ISP_DPCC_METHODS_MAX]; 269 269 __u32 ro_limits; 270 270 __u32 rnd_offs; 271 - } __packed; 271 + }; 272 272 273 273 /** 274 274 * struct rkisp1_cif_isp_gamma_corr_curve - gamma curve point definition y-axis (output). ··· 280 280 */ 281 281 struct rkisp1_cif_isp_gamma_corr_curve { 282 282 __u16 gamma_y[RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE]; 283 - } __packed; 283 + }; 284 284 285 285 /** 286 286 * struct rkisp1_cif_isp_gamma_curve_x_axis_pnts - De-Gamma Curve definition x increments ··· 296 296 struct rkisp1_cif_isp_gamma_curve_x_axis_pnts { 297 297 __u32 gamma_dx0; 298 298 __u32 gamma_dx1; 299 - } __packed; 299 + }; 300 300 301 301 /** 302 302 * struct rkisp1_cif_isp_sdg_config - Configuration used by sensor degamma ··· 311 311 struct rkisp1_cif_isp_gamma_corr_curve curve_g; 312 312 struct rkisp1_cif_isp_gamma_corr_curve curve_b; 313 313 struct rkisp1_cif_isp_gamma_curve_x_axis_pnts xa_pnts; 314 - } __packed; 314 + }; 315 315 316 316 /** 317 317 * struct rkisp1_cif_isp_lsc_config - Configuration used by Lens shading correction ··· 340 340 __u16 y_size_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; 341 341 __u16 config_width; 342 342 __u16 config_height; 343 - } __packed; 343 + }; 344 344 345 345 /** 346 346 * struct rkisp1_cif_isp_ie_config - Configuration used by image effects ··· 366 366 __u16 eff_mat_4; 367 367 __u16 eff_mat_5; 368 368 __u16 eff_tint; 369 - } __packed; 369 + }; 370 370 371 371 /** 372 372 * struct rkisp1_cif_isp_cproc_config - Configuration used by Color Processing ··· 388 388 __u8 brightness; 389 389 __u8 sat; 390 390 __u8 hue; 391 - } __packed; 391 + }; 392 392 393 393 /** 394 394 * struct rkisp1_cif_isp_awb_meas_config - Configuration used by auto white balance ··· 422 422 __u8 awb_ref_cr; 423 423 __u8 awb_ref_cb; 424 424 __u8 enable_ymax_cmp; 425 - } __packed; 425 + }; 426 426 427 427 /** 428 428 * struct rkisp1_cif_isp_awb_gain_config - Configuration used by auto white balance gain ··· 442 442 __u16 gain_green_r; 443 443 __u16 gain_blue; 444 444 __u16 gain_green_b; 445 - } __packed; 445 + }; 446 446 447 447 /** 448 448 * struct rkisp1_cif_isp_flt_config - Configuration used by ISP filtering ··· 480 480 __u32 fac_mid; 481 481 __u32 fac_bl0; 482 482 __u32 fac_bl1; 483 - } __packed; 483 + }; 484 484 485 485 /** 486 486 * struct rkisp1_cif_isp_bdm_config - Configuration used by Bayer DeMosaic ··· 489 489 */ 490 490 struct rkisp1_cif_isp_bdm_config { 491 491 __u8 demosaic_th; 492 - } __packed; 492 + }; 493 493 494 494 /** 495 495 * struct rkisp1_cif_isp_ctk_config - Configuration used by Cross Talk correction ··· 502 502 struct rkisp1_cif_isp_ctk_config { 503 503 __u16 coeff[3][3]; 504 504 __u16 ct_offset[3]; 505 - } __packed; 505 + }; 506 506 507 507 enum rkisp1_cif_isp_goc_mode { 508 508 RKISP1_CIF_ISP_GOC_MODE_LOGARITHMIC, ··· 518 518 struct rkisp1_cif_isp_goc_config { 519 519 __u32 mode; 520 520 __u16 gamma_y[RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES]; 521 - } __packed; 521 + }; 522 522 523 523 /** 524 524 * struct rkisp1_cif_isp_hst_config - Configuration used by Histogram ··· 534 534 __u8 histogram_predivider; 535 535 struct rkisp1_cif_isp_window meas_window; 536 536 __u8 hist_weight[RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE]; 537 - } __packed; 537 + }; 538 538 539 539 /** 540 540 * struct rkisp1_cif_isp_aec_config - Configuration used by Auto Exposure Control ··· 547 547 __u32 mode; 548 548 __u32 autostop; 549 549 struct rkisp1_cif_isp_window meas_window; 550 - } __packed; 550 + }; 551 551 552 552 /** 553 553 * struct rkisp1_cif_isp_afc_config - Configuration used by Auto Focus Control ··· 563 563 struct rkisp1_cif_isp_window afm_win[RKISP1_CIF_ISP_AFM_MAX_WINDOWS]; 564 564 __u32 thres; 565 565 __u32 var_shift; 566 - } __packed; 566 + }; 567 567 568 568 /** 569 569 * enum rkisp1_cif_isp_dpf_gain_usage - dpf gain usage ··· 618 618 struct rkisp1_cif_isp_dpf_nll { 619 619 __u16 coeff[RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS]; 620 620 __u32 scale_mode; 621 - } __packed; 621 + }; 622 622 623 623 /** 624 624 * struct rkisp1_cif_isp_dpf_rb_flt - Red blue filter config ··· 634 634 __u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS]; 635 635 __u8 r_enable; 636 636 __u8 b_enable; 637 - } __packed; 637 + }; 638 638 639 639 /** 640 640 * struct rkisp1_cif_isp_dpf_g_flt - Green filter Configuration ··· 647 647 __u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS]; 648 648 __u8 gr_enable; 649 649 __u8 gb_enable; 650 - } __packed; 650 + }; 651 651 652 652 /** 653 653 * struct rkisp1_cif_isp_dpf_gain - Noise function Configuration ··· 666 666 __u16 nf_b_gain; 667 667 __u16 nf_gr_gain; 668 668 __u16 nf_gb_gain; 669 - } __packed; 669 + }; 670 670 671 671 /** 672 672 * struct rkisp1_cif_isp_dpf_config - Configuration used by De-noising pre-filter ··· 681 681 struct rkisp1_cif_isp_dpf_g_flt g_flt; 682 682 struct rkisp1_cif_isp_dpf_rb_flt rb_flt; 683 683 struct rkisp1_cif_isp_dpf_nll nll; 684 - } __packed; 684 + }; 685 685 686 686 /** 687 687 * struct rkisp1_cif_isp_dpf_strength_config - strength of the filter ··· 694 694 __u8 r; 695 695 __u8 g; 696 696 __u8 b; 697 - } __packed; 697 + }; 698 698 699 699 /** 700 700 * struct rkisp1_cif_isp_isp_other_cfg - Parameters for some blocks in rockchip isp1 ··· 728 728 struct rkisp1_cif_isp_dpf_strength_config dpf_strength_config; 729 729 struct rkisp1_cif_isp_cproc_config cproc_config; 730 730 struct rkisp1_cif_isp_ie_config ie_config; 731 - } __packed; 731 + }; 732 732 733 733 /** 734 734 * struct rkisp1_cif_isp_isp_meas_cfg - Rockchip ISP1 Measure Parameters ··· 743 743 struct rkisp1_cif_isp_hst_config hst_config; 744 744 struct rkisp1_cif_isp_aec_config aec_config; 745 745 struct rkisp1_cif_isp_afc_config afc_config; 746 - } __packed; 746 + }; 747 747 748 748 /** 749 749 * struct rkisp1_params_cfg - Rockchip ISP1 Input Parameters Meta Data ··· 762 762 763 763 struct rkisp1_cif_isp_isp_meas_cfg meas; 764 764 struct rkisp1_cif_isp_isp_other_cfg others; 765 - } __packed; 765 + }; 766 766 767 767 /*---------- PART2: Measurement Statistics ------------*/ 768 768 ··· 783 783 __u8 mean_y_or_g; 784 784 __u8 mean_cb_or_b; 785 785 __u8 mean_cr_or_r; 786 - } __packed; 786 + }; 787 787 788 788 /** 789 789 * struct rkisp1_cif_isp_awb_stat - statistics automatic white balance data ··· 792 792 */ 793 793 struct rkisp1_cif_isp_awb_stat { 794 794 struct rkisp1_cif_isp_awb_meas awb_mean[RKISP1_CIF_ISP_AWB_MAX_GRID]; 795 - } __packed; 795 + }; 796 796 797 797 /** 798 798 * struct rkisp1_cif_isp_bls_meas_val - BLS measured values ··· 807 807 __u16 meas_gr; 808 808 __u16 meas_gb; 809 809 __u16 meas_b; 810 - } __packed; 810 + }; 811 811 812 812 /** 813 813 * struct rkisp1_cif_isp_ae_stat - statistics auto exposure data ··· 820 820 struct rkisp1_cif_isp_ae_stat { 821 821 __u8 exp_mean[RKISP1_CIF_ISP_AE_MEAN_MAX]; 822 822 struct rkisp1_cif_isp_bls_meas_val bls_val; 823 - } __packed; 823 + }; 824 824 825 825 /** 826 826 * struct rkisp1_cif_isp_af_meas_val - AF measured values ··· 831 831 struct rkisp1_cif_isp_af_meas_val { 832 832 __u32 sum; 833 833 __u32 lum; 834 - } __packed; 834 + }; 835 835 836 836 /** 837 837 * struct rkisp1_cif_isp_af_stat - statistics auto focus data ··· 843 843 */ 844 844 struct rkisp1_cif_isp_af_stat { 845 845 struct rkisp1_cif_isp_af_meas_val window[RKISP1_CIF_ISP_AFM_MAX_WINDOWS]; 846 - } __packed; 846 + }; 847 847 848 848 /** 849 849 * struct rkisp1_cif_isp_hist_stat - statistics histogram data ··· 855 855 */ 856 856 struct rkisp1_cif_isp_hist_stat { 857 857 __u16 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; 858 - } __packed; 858 + }; 859 859 860 860 /** 861 861 * struct rkisp1_cif_isp_stat - Rockchip ISP1 Statistics Data ··· 870 870 struct rkisp1_cif_isp_ae_stat ae; 871 871 struct rkisp1_cif_isp_af_stat af; 872 872 struct rkisp1_cif_isp_hist_stat hist; 873 - } __packed; 873 + }; 874 874 875 875 /** 876 876 * struct rkisp1_stat_buffer - Rockchip ISP1 Statistics Meta Data ··· 883 883 __u32 meas_type; 884 884 __u32 frame_id; 885 885 struct rkisp1_cif_isp_stat params; 886 - } __packed; 886 + }; 887 887 888 888 #endif /* _UAPI_RKISP1_CONFIG_H */