disp: msm: Fix byte alignment problem on 32bits OS
There is potential byte alignment problem on 32bits OS which will cause incorrect histogram blob id getting from the user space. This change fixes byte alignment problem on 32bits OS by keeping the struct members in one complete struct as the user space using. In previous code start address of 'info' would align to multiple of 8, so there would be 4 bytes padding between member 'event' and 'info' on 32 bits OS. It is affected by member 'base'. But user space just uses struct drm_msm_event_resp only, not affected by member 'base'. Driver code intends to send drm_msm_event_resp, but actually send unpacked members. Change-Id: I5410f5b1626387707a57cbcef9c651aa11914d9d Signed-off-by: Renchao Liu <rencliu@codeaurora.org>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Gerrit - the friendly Code Review server

vecāks
c3010cfe77
revīzija
b3cb4343b1
@@ -770,15 +770,10 @@ struct msm_display_conn_params {
|
||||
* struct msm_drm_event - defines custom event notification struct
|
||||
* @base: base object required for event notification by DRM framework.
|
||||
* @event: event object required for event notification by DRM framework.
|
||||
* @info: contains information of DRM object for which events has been
|
||||
* requested.
|
||||
* @data: memory location which contains response payload for event.
|
||||
*/
|
||||
struct msm_drm_event {
|
||||
struct drm_pending_event base;
|
||||
struct drm_event event;
|
||||
struct drm_msm_event_req info;
|
||||
u8 data[];
|
||||
struct drm_msm_event_resp event;
|
||||
};
|
||||
|
||||
/* Commit/Event thread specific structure */
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user