提交 ec58cbed 编写于 作者: A Alan Cox 提交者: Greg Kroah-Hartman

atomisp: handle allocation calls before init in the hmm layer

Currently the code handles this in the abstraction above. We want to remove
that abstraction so begin by pushing down the sanity check. Unfortunately
at this point we can't simply fix the init order.
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 92ac903a
...@@ -226,6 +226,11 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, ...@@ -226,6 +226,11 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
struct hmm_buffer_object *bo; struct hmm_buffer_object *bo;
int ret; int ret;
/* Check if we are initialized. In the ideal world we wouldn't need
this but we can tackle it once the driver is a lot cleaner */
if (!dummy_ptr)
hmm_init();
/*Get page number from size*/ /*Get page number from size*/
pgnr = size_to_pgnr_ceil(bytes); pgnr = size_to_pgnr_ceil(bytes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册