video: driver: assign session id as hash value

Use hashed value for session id to over come the
same session ids being used concurrently where
one session is being closed and the other session
opening might be getting same session id.

Change-Id: I0bba056f26e404a7ff3b92ca9a81e673a0a6802f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Этот коммит содержится в:
Maheshwar Ajja
2021-01-21 14:01:10 -08:00
коммит произвёл Gerrit - the friendly Code Review server
родитель 3b10d3f3d8
Коммит 4765d28baa

Просмотреть файл

@@ -5,6 +5,7 @@
#include <linux/iommu.h>
#include <linux/workqueue.h>
#include <linux/hash.h>
#include <media/v4l2_vidc_extensions.h>
#include "msm_media_info.h"
@@ -1994,7 +1995,7 @@ int msm_vidc_add_session(struct msm_vidc_inst *inst)
mutex_unlock(&core->lock);
/* assign session_id */
inst->session_id = count + 1;
inst->session_id = hash32_ptr(inst);
inst->sid = inst->session_id;
return rc;