intel: Load the driver even if I915_PARAM_REVISION is not found.

Submitted by Rafael Antognolli on Aug. 19, 2019, 7:28 p.m.

Details

Message ID 20190819192855.18964-1-rafael.antognolli@intel.com
State New
Headers show
Series "intel: Load the driver even if I915_PARAM_REVISION is not found." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli Aug. 19, 2019, 7:28 p.m.
This param is only available starting on kernel 4.16. Use a default
value of 0 if it is not found instead.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Mark Janes <mark.a.janes@intel.com>
---
 src/intel/dev/gen_device_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index 3953a1f4af3..375d13630a5 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -1366,7 +1366,7 @@  gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
       return false;
 
    if (!getparam(fd, I915_PARAM_REVISION, &devinfo->revision))
-       return false;
+      devinfo->revision = 0;
 
    if (!query_topology(devinfo, fd)) {
       if (devinfo->gen >= 10) {

Comments

This commit might also need a:

Fixes: 96e1c945f2b ("i965: Move device info initialization to common
                    code")

On Mon, Aug 19, 2019 at 12:28:55PM -0700, Rafael Antognolli wrote:
> This param is only available starting on kernel 4.16. Use a default
> value of 0 if it is not found instead.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Mark Janes <mark.a.janes@intel.com>
> ---
>  src/intel/dev/gen_device_info.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
> index 3953a1f4af3..375d13630a5 100644
> --- a/src/intel/dev/gen_device_info.c
> +++ b/src/intel/dev/gen_device_info.c
> @@ -1366,7 +1366,7 @@ gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
>        return false;
>  
>     if (!getparam(fd, I915_PARAM_REVISION, &devinfo->revision))
> -       return false;
> +      devinfo->revision = 0;
>  
>     if (!query_topology(devinfo, fd)) {
>        if (devinfo->gen >= 10) {
> -- 
> 2.21.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On 19/08/2019 21:28, Rafael Antognolli wrote:
> This param is only available starting on kernel 4.16. Use a default
> value of 0 if it is not found instead.


I trace the param to :


commit 27cd44618b92fc8c6889e4628407791e45422bac
Author: Neil Roberts <neil@linux.intel.com>
Date:   Wed Mar 4 14:41:16 2015 +0000

     drm/i915: Add I915_PARAM_REVISION


That seems to be back into 4.1. Could it be another issue?


-Lionel


>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Mark Janes <mark.a.janes@intel.com>
> ---
>   src/intel/dev/gen_device_info.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
> index 3953a1f4af3..375d13630a5 100644
> --- a/src/intel/dev/gen_device_info.c
> +++ b/src/intel/dev/gen_device_info.c
> @@ -1366,7 +1366,7 @@ gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
>         return false;
>   
>      if (!getparam(fd, I915_PARAM_REVISION, &devinfo->revision))
> -       return false;
> +      devinfo->revision = 0;
>   
>      if (!query_topology(devinfo, fd)) {
>         if (devinfo->gen >= 10) {
On Mon, Aug 19, 2019 at 11:25:38PM +0200, Lionel Landwerlin wrote:
> On 19/08/2019 21:28, Rafael Antognolli wrote:
> > This param is only available starting on kernel 4.16. Use a default
> > value of 0 if it is not found instead.
> 
> 
> I trace the param to :
> 
> 
> commit 27cd44618b92fc8c6889e4628407791e45422bac
> Author: Neil Roberts <neil@linux.intel.com>
> Date:   Wed Mar 4 14:41:16 2015 +0000
> 
>     drm/i915: Add I915_PARAM_REVISION
> 
> 
> That seems to be back into 4.1. Could it be another issue?
> 

Yeah, I noticed it later, just ignore this patch.

Thanks for looking, though.

Rafael

> -Lionel
> 
> 
> > 
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Mark Janes <mark.a.janes@intel.com>
> > ---
> >   src/intel/dev/gen_device_info.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
> > index 3953a1f4af3..375d13630a5 100644
> > --- a/src/intel/dev/gen_device_info.c
> > +++ b/src/intel/dev/gen_device_info.c
> > @@ -1366,7 +1366,7 @@ gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
> >         return false;
> >      if (!getparam(fd, I915_PARAM_REVISION, &devinfo->revision))
> > -       return false;
> > +      devinfo->revision = 0;
> >      if (!query_topology(devinfo, fd)) {
> >         if (devinfo->gen >= 10) {
> 
>