linux/include/drm
Daniel Mentz c9d27c6be5 drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
The MIPI DCS specification demands that brightness values are sent in
big endian byte order. It also states that one parameter (i.e. one byte)
shall be sent/received for 8 bit wide values, and two parameters shall
be used for values that are between 9 and 16 bits wide.

Add new functions to properly handle 16-bit brightness in big endian,
since the two 8- and 16-bit cases are distinct from each other.

[richard: use separate functions instead of switch/case]
[richard: split into 16-bit component]

Fixes: 1a9d759331 ("drm/dsi: Implement DCS set/get display brightness")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Link: 754affd62d
[richard: fix 16-bit brightness_get]
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Tested-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-2-mailingradian@gmail.com
2023-01-19 08:21:56 +01:00
..
bridge drm: bridge: dw_hdmi: Audio: Add General Parallel Audio (GPA) driver 2022-04-19 18:23:48 +02:00
display Merge tag 'amd-drm-next-6.1-2022-09-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2022-09-12 19:17:41 +10:00
i2c
ttm drm/ttm/vmwgfx: move ttm_bo_wait into VMWGFX 2023-01-18 15:57:52 +01:00
amd_asic_type.h drm/amdgpu: add new asic_type for IP discovery 2021-10-04 15:23:01 -04:00
drm_aperture.h drm/aperture: Pass DRM driver structure instead of driver name 2021-07-01 11:11:55 +02:00
drm_atomic_helper.h drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() 2022-10-08 15:26:55 +02:00
drm_atomic_state_helper.h drm/atomic-helper: Add an analog TV atomic_check implementation 2022-11-24 12:42:40 +01:00
drm_atomic_uapi.h drm: handle kernel fences in drm_gem_plane_helper_prepare_fb v2 2022-05-02 09:01:51 +02:00
drm_atomic.h drm/atomic: Constify the old/new state accessors 2022-11-28 11:46:50 +01:00
drm_audio_component.h drm/audio: make drm_audio_component.h self-contained 2022-11-29 14:14:51 +02:00
drm_auth.h drm: clarify usage of drm leases 2021-07-29 09:12:01 +02:00
drm_blend.h
drm_bridge_connector.h drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd() 2023-01-05 15:08:10 +01:00
drm_bridge.h drm/bridge: Introduce pre_enable_prev_first to alter bridge init order 2022-12-08 09:56:57 +01:00
drm_buddy.h drm/selftests: add drm buddy alloc range testcase 2022-02-23 10:44:43 +01:00
drm_cache.h LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
drm_client.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_color_mgmt.h
drm_connector.h drm/modes: Introduce the tv_mode property as a command-line option 2022-11-24 12:42:39 +01:00
drm_crtc_helper.h drm/crtc-helper: Remove most include statements from drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
drm_crtc.h drm/crtc: Introduce drmm_crtc_init_with_planes 2022-07-13 10:46:05 +02:00
drm_damage_helper.h drm/plane: Move drm_plane_enable_fb_damage_clips into core 2021-07-27 12:21:22 +02:00
drm_debugfs_crc.h
drm_debugfs.h drm/debugfs: add descriptions to struct parameters 2023-01-10 10:01:18 -03:00
drm_device.h drm: document better that drivers shouldn't use drm_minor directly 2023-01-12 00:19:14 +01:00
drm_displayid.h drm/displayid: convert to drm_edid 2022-05-13 18:55:13 +03:00
drm_drv.h drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_edid.h drm/edid: move edid load declarations to internal header 2022-10-26 09:53:56 +03:00
drm_encoder_slave.h drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
drm_encoder.h drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_fb_dma_helper.h drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
drm_fb_helper.h drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h 2023-01-13 13:19:13 +01:00
drm_fbdev_generic.h drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
drm_file.h drm: Remove the drm_get_unmapped_area() helper 2022-08-04 11:39:27 -04:00
drm_fixed.h drm: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:30 +01:00
drm_flip_work.h
drm_format_helper.h drm/format-helper: Simplify drm_fb_build_fourcc_list() 2023-01-03 14:27:39 +01:00
drm_fourcc.h drm/fourcc: Add drm_format_info.is_color_indexed flag 2022-07-09 15:00:08 +02:00
drm_framebuffer.h drm/fb: Improve drm_framebuffer.offsets documentation 2022-07-09 15:58:52 +02:00
drm_gem_atomic_helper.h drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_gem_dma_helper.h drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_gem_framebuffer_helper.h drm/gem: Ignore color planes that are unused by framebuffer format 2022-05-19 19:25:02 +02:00
drm_gem_shmem_helper.h drm: correct comments 2022-07-21 12:16:10 +02:00
drm_gem_ttm_helper.h drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
drm_gem_vram_helper.h drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
drm_gem.h drm/gem-shmem: When drm_gem_object_init failed, should release object 2022-11-21 16:55:52 +01:00
drm_ioctl.h drm: unexport drm_ioctl_permit 2021-08-13 17:50:48 +02:00
drm_kunit_helpers.h drm/tests: helpers: Allow to pass a custom drm_driver 2022-12-08 09:56:55 +01:00
drm_lease.h
drm_legacy.h drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_managed.h drm: Add DRM-managed mutex_init() 2022-05-05 09:04:10 +02:00
drm_mipi_dbi.h drm/mipi-dbi: Support separate I/O regulator 2022-12-14 14:57:09 +01:00
drm_mipi_dsi.h drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness 2023-01-19 08:21:56 +01:00
drm_mm.h drm: Replace kernel.h with the necessary inclusions 2021-12-09 13:46:13 +01:00
drm_mode_config.h drm/connector: Add TV standard property 2022-11-24 12:42:39 +01:00
drm_mode_object.h drm/object: Add drm_object_property_get_default_value() function 2022-02-25 17:55:42 +01:00
drm_modes.h drm/modes: Add a function to generate analog display modes 2022-11-24 12:42:39 +01:00
drm_modeset_helper_vtables.h drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h 2023-01-13 13:19:13 +01:00
drm_modeset_helper.h
drm_modeset_lock.h drm/locking: fix drm_modeset_acquire_ctx kernel-doc 2022-01-20 14:41:25 +02:00
drm_module.h drm: Provide platform module-init macro 2022-01-19 18:40:18 +01:00
drm_of.h drm: of: Mark empty drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep static 2022-06-12 16:07:05 +02:00
drm_panel.h drm/panel: Add prepare_prev_first flag to drm_panel 2022-12-08 09:56:57 +01:00
drm_pciids.h drm: Remove some obsolete drm pciids(tdfx, mga, i810, savage, r128, sis, via) 2023-01-13 09:44:56 +01:00
drm_plane_helper.h drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro 2022-09-20 09:42:31 +02:00
drm_plane.h drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_prime.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_print.h drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED() 2023-01-18 10:00:33 +01:00
drm_privacy_screen_consumer.h drm/privacy-screen: Add notifier support (v2) 2021-10-14 13:12:25 +02:00
drm_privacy_screen_driver.h drm/privacy_screen: Add drvdata in drm_privacy_screen 2022-01-10 12:17:37 +01:00
drm_privacy_screen_machine.h drm/privacy-screen: Add X86 specific arch init code 2021-10-14 13:12:24 +02:00
drm_probe_helper.h drm/probe-helper: Provide a TV get_modes helper 2022-11-24 12:42:40 +01:00
drm_property.h drm: document drm_property_enum.value for bitfields 2021-07-26 10:08:22 +02:00
drm_rect.h drm/rect: Add DRM_RECT_INIT() macro 2022-06-27 13:45:48 +02:00
drm_self_refresh_helper.h
drm_simple_kms_helper.h drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_syncobj.h
drm_sysfs.h drm/sysfs: introduce drm_sysfs_connector_hotplug_event 2021-11-02 14:27:06 +01:00
drm_util.h
drm_utils.h
drm_vblank_work.h
drm_vblank.h
drm_vma_manager.h drm/vma: Add a driver_private member to vma_node. 2021-06-11 10:53:18 +02:00
drm_writeback.h drm: introduce drm_writeback_connector_init_with_encoder() API 2022-05-02 02:12:59 +03:00
gma_drm.h
gpu_scheduler.h drm/scheduler: cleanup define 2023-01-18 12:46:16 +01:00
gud.h drm/gud: Add GUD_PIXEL_FORMAT_RGB888 2021-10-04 12:06:14 +02:00
i915_component.h drm/i915/pxp: Define PXP component interface 2021-10-04 13:09:53 -04:00
i915_drm.h drm/i915: include uapi/drm/i915_drm.h directly where needed 2022-03-17 20:06:04 +02:00
i915_mei_hdcp_interface.h drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
i915_pciids.h drm/i915: Add new ADL-S pci id 2022-08-26 05:46:23 -07:00
i915_pxp_tee_interface.h mei: pxp: add command streamer API to the PXP driver 2022-10-03 11:29:11 -07:00
intel_lpe_audio.h
intel-gtt.h agp/intel: Rename intel-gtt symbols 2022-06-22 15:52:55 -07:00
spsc_queue.h
task_barrier.h