Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
Hello again.
I just find out something weird.
1_ I typed make menuconfig
2_ I went to "general setup" and unchecked  "Automatically append
version information to the version string"
3_ recompiled and installed the new kernel

and suddenly all problems are disappeared.

I am wondering why this option causes problems.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread valdis . kletnieks
On Mon, 13 Feb 2017 05:26:50 +0330, Ali Aminian said:
> Thank you for your response.
> It does not work means:
> 1_ I have downloaded amdgpu-pro driver from AMD website and installed it.

Complain to AMD then, because..

> 2_ I have compiled linux kernel 4.10 and 4.9 with oldconfig.

> error: too many arguments to function ‘ttm_bo_reserve’
>   return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);

However, include/drm/ttm/ttm_bo_driver.h has this definition:

static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo,
   bool interruptible, bool no_wait,
   struct ww_acquire_ctx *ticket)
{


which means AMD is close to a year out of date with respect to upstream:

commit dfd5e50ea43ca4a89de061fb69618299760eb682
Author: Christian K?nig 
Date:   Wed Apr 6 11:12:03 2016 +0200

drm/ttm: remove use_ticket parameter from ttm_bo_reserve

Not used any more.

Reviewed-by: Sinclair Yeh 
Signed-off-by: Christian K?nig 
Reviewed-by: Alex Deucher 
Signed-off-by: Alex Deucher 

Or you can fix it yourself, I've provided enough hints already. :)

(Fixing the other issues should be equally easy)



pgpwdXqVYPjqV.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
Thank you for your response.
It does not work means:
1_ I have downloaded amdgpu-pro driver from AMD website and installed it.
2_ I have compiled linux kernel 4.10 and 4.9 with oldconfig.
3_ then I booted to new kernel and see login screen is distorted.
4_ I tried to login but it loops back to login screen again.
5_ Ctrl Alt F1-F6 results in a blank screen.
6_ I sshed into the system and check if amdgpu is loaded by "lsmod | grep amd"
and yes it is loaded.
7_ I uninstalled and installed amdgpu-pro again and i got dkms error
and it refered me to
/var/lib/dkms/amdgpu-pro/16.40-348864/build/make.log for further
details.

and here is the log file:

DKMS make.log for amdgpu-pro-14.40-348864 for kernel 4.10.0-rc7+ (x86_64)
Mon Feb 13 03:53:09 IRST 2017
  LD  /var/lib/dkms/amdgpu-pro/16.40-348864/build/built-in.o
  LD  /var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/built-in.o
  CC [M]  /var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:8:0,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_drm.h:68:72:
error: operator '+' has no right operand
   && LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && (UBUNTU_BUILD_NUM < 36)) \
^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:9:0,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:
In function ‘kcl_ttm_bo_reserve’:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:109:9:
error: too many arguments to function ‘ttm_bo_reserve’
  return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
 ^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:6:0,
 from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:9,
 from :0:
./include/drm/ttm/ttm_bo_driver.h:875:19: note: declared here
 static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
   ^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:5:0,
 from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:10,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../amdgpu/amdgpu.h:
At top level:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../amdgpu/amdgpu.h:37:25:
fatal error: linux/fence.h: No such file or directory
compilation terminated.
scripts/Makefile.build:294: recipe for target
'/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o'
failed
make[4]: *** 
[/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o]
Error 1
scripts/Makefile.build:553: recipe for target
'/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu' failed
make[3]: *** [/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu] Error 2
Makefile:1490: recipe for target
'_module_/var/lib/dkms/amdgpu-pro/16.40-348864/build' failed
make[2]: *** [_module_/var/lib/dkms/amdgpu-pro/16.40-348864/build] Error 2

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


recovery from fail

2017-02-12 Thread Tobin Harding
I have made and epic fail and am asking for advice on how to proceed
to cause the least amount of upset.

I submitted a simple patch series to LKML. A reviewer made a
suggestion. I submitted v2 - without building it :(

kbuild test robot picked up that it doesn't compile. The problem is
that I now cannot get the second patch of the series to compile.

What is the correct protocol to follow?

I don't want to make any more noise than I already have but I also
don't want to ignore the reviewer by not implementing the suggested
changes.

Is it rude to reply to the original review email for further
discussion having already botched the patch?


Thanks in advance,
Tobin.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread valdis . kletnieks
On Sun, 12 Feb 2017 17:45:58 +0330, Ali Aminian said:
> I was heard that amdgpu pro is user space driver and the kernel space
> part (amdgpu) is merged into Linux kernel. And that means amdgpu pro
> should work on all kernels above 4.3. But why amdgpu pro does not work
> on kernel 4.10?

What do you mean by "does not work"?  It doesn't compile?  It won't modprobe?
It doesn't behave right? It crashes?

Most likely, some API changed in 4.10 and nobody has fixed amdgpu to match.


pgpqL4JJEZ5ar.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
I was heard that amdgpu pro is user space driver and the kernel space
part (amdgpu) is merged into Linux kernel. And that means amdgpu pro
should work on all kernels above 4.3. But why amdgpu pro does not work
on kernel 4.10?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Sleeping in workqueues

2017-02-12 Thread Tobias FItschen
Hello people,

I have a question regarding workqueues. I know it's possible to sleep in 
workqueue routines. Does that mean I can use:

1. "set_current_state(TASK_INTERRUPTIBLE);" get the the task with 
"current" and pass it to a other task and then call "schedule();" in a 
workqueue routine and at a different place (perhaps another workqueue 
routine) use wake_up_process(task)" ?

2. initialize completions in a workqueue routine and call complete() in 
a different workqueue routine?

I tried it in a simple example setup and both worked. I just want to 
make sure that was not just by accident. As I understand it a work item 
is executed on a worker, which is a unique process, but I also know that 
there are exceptions, e.g. I can not copy to or from user space in a 
workqueue routine. Also I don't know if a worker "sticks" with the 
current work item until it is completed or can execute multiple work 
items at the "same" time.

3. In case completions and schedule()/wakeup() work, I would also like 
to know, which has the better performance.

Thanks a lot already!

Tobias


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Code Compilation

2017-02-12 Thread Alexander Kapshuk
On Sun, Feb 12, 2017 at 10:49 AM, Wasim Akram  wrote:
> I want to organize my code C code , such as all header file in include
> folder , all library file in lib folder , main file in src and compile
> output should be generated in /bin . I am facing problem in code
> compilation.
>
> On Sun, Feb 12, 2017 at 2:09 PM, Alexander Kapshuk
>  wrote:
>> On Sun, Feb 12, 2017 at 10:00 AM, Wasim Akram  
>> wrote:
>>> How to compile the code and get binary in bin folder , if hearder
>>> files , library files and source file is present in include,lib,src
>>> folders respectively ?
>>>
>>> --
>>
>> Can you please give us more detail?
>>
>> What binary do you want compiled and put in what bin folder? Are you
>> talking about the kernel binary? If so, 'make install' places it in
>> /boot.
>> Or are you asking about how to compile an out-of-tree kernel module?
>
>
>
> --


Please, do not top post.

You have not answered the questions I asked in my previous email.

What code are you trying to compile?
Are you working on an out-of-tree kernel driver?
Or are working on some kernel subsystem?
Or are working on something else you want to be a part of the kernel code base?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Code Compilation

2017-02-12 Thread Alexander Kapshuk
On Sun, Feb 12, 2017 at 10:00 AM, Wasim Akram  wrote:
> How to compile the code and get binary in bin folder , if hearder
> files , library files and source file is present in include,lib,src
> folders respectively ?
>
> --

Can you please give us more detail?

What binary do you want compiled and put in what bin folder? Are you
talking about the kernel binary? If so, 'make install' places it in
/boot.
Or are you asking about how to compile an out-of-tree kernel module?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Code Compilation

2017-02-12 Thread Wasim Akram
How to compile the code and get binary in bin folder , if hearder
files , library files and source file is present in include,lib,src
folders respectively ?

-- 


Thanks and Regards

Wasim Akram
Ph: 7702843288

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies