[PATCH 2/2] drm/radeon/kms: Skip ACPI call to ATIF when possible
I am under the impression that it only makes sense to call the ATIF method if the graphics device has an ACPI handle attached. So we could skip the call altogether if there is no such handle. Signed-off-by: Jean Delvare Cc: David Airlie Cc: Alex Deucher --- This is only tested on a system where the Radeon device has no ACPI handle and there is no ATIF method. This should also be tested on systems with ATIF, presumably laptops. drivers/gpu/drm/radeon/radeon_acpi.c |8 1 file changed, 4 insertions(+), 4 deletions(-) --- linux-3.2-rc3.orig/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:12:02.0 +0100 +++ linux-3.2-rc3/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:59:46.0 +0100 @@ -51,13 +51,13 @@ int radeon_acpi_init(struct radeon_devic acpi_handle handle; int ret; - /* No need to proceed if we're sure that ATIF is not supported */ - if (!ASIC_IS_AVIVO(rdev) || !rdev->bios) - return 0; - /* Get the device handle */ handle = DEVICE_ACPI_HANDLE(>pdev->dev); + /* No need to proceed if we're sure that ATIF is not supported */ + if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle) + return 0; + /* Call the ATIF method */ ret = radeon_atif_call(handle); if (ret) -- Jean Delvare Suse L3
[PATCH 2/2] drm/radeon/kms: Skip ACPI call to ATIF when possible
On Wed, Nov 30, 2011 at 11:36 AM, Jean Delvare wrote: > I am under the impression that it only makes sense to call the ATIF > method if the graphics device has an ACPI handle attached. So we could > skip the call altogether if there is no such handle. > > Signed-off-by: Jean Delvare > Cc: David Airlie > Cc: Alex Deucher > --- > This is only tested on a system where the Radeon device has no ACPI > handle and there is no ATIF method. This should also be tested on > systems with ATIF, presumably laptops. I think this makes sense. Reviewed-by: Alex Deucher > > ?drivers/gpu/drm/radeon/radeon_acpi.c | ? ?8 > ?1 file changed, 4 insertions(+), 4 deletions(-) > > --- linux-3.2-rc3.orig/drivers/gpu/drm/radeon/radeon_acpi.c ? ? 2011-11-29 > 18:12:02.0 +0100 > +++ linux-3.2-rc3/drivers/gpu/drm/radeon/radeon_acpi.c ?2011-11-29 > 18:59:46.0 +0100 > @@ -51,13 +51,13 @@ int radeon_acpi_init(struct radeon_devic > ? ? ? ?acpi_handle handle; > ? ? ? ?int ret; > > - ? ? ? /* No need to proceed if we're sure that ATIF is not supported */ > - ? ? ? if (!ASIC_IS_AVIVO(rdev) || !rdev->bios) > - ? ? ? ? ? ? ? return 0; > - > ? ? ? ?/* Get the device handle */ > ? ? ? ?handle = DEVICE_ACPI_HANDLE(>pdev->dev); > > + ? ? ? /* No need to proceed if we're sure that ATIF is not supported */ > + ? ? ? if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle) > + ? ? ? ? ? ? ? return 0; > + > ? ? ? ?/* Call the ATIF method */ > ? ? ? ?ret = radeon_atif_call(handle); > ? ? ? ?if (ret) > > -- > Jean Delvare > Suse L3 > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel >
[PATCH 2/2] drm/radeon/kms: Skip ACPI call to ATIF when possible
I am under the impression that it only makes sense to call the ATIF method if the graphics device has an ACPI handle attached. So we could skip the call altogether if there is no such handle. Signed-off-by: Jean Delvare jdelv...@suse.de Cc: David Airlie airl...@linux.ie Cc: Alex Deucher alexander.deuc...@amd.com --- This is only tested on a system where the Radeon device has no ACPI handle and there is no ATIF method. This should also be tested on systems with ATIF, presumably laptops. drivers/gpu/drm/radeon/radeon_acpi.c |8 1 file changed, 4 insertions(+), 4 deletions(-) --- linux-3.2-rc3.orig/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:12:02.0 +0100 +++ linux-3.2-rc3/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:59:46.0 +0100 @@ -51,13 +51,13 @@ int radeon_acpi_init(struct radeon_devic acpi_handle handle; int ret; - /* No need to proceed if we're sure that ATIF is not supported */ - if (!ASIC_IS_AVIVO(rdev) || !rdev-bios) - return 0; - /* Get the device handle */ handle = DEVICE_ACPI_HANDLE(rdev-pdev-dev); + /* No need to proceed if we're sure that ATIF is not supported */ + if (!ASIC_IS_AVIVO(rdev) || !rdev-bios || !handle) + return 0; + /* Call the ATIF method */ ret = radeon_atif_call(handle); if (ret) -- Jean Delvare Suse L3 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/radeon/kms: Skip ACPI call to ATIF when possible
On Wed, Nov 30, 2011 at 11:36 AM, Jean Delvare jdelv...@suse.de wrote: I am under the impression that it only makes sense to call the ATIF method if the graphics device has an ACPI handle attached. So we could skip the call altogether if there is no such handle. Signed-off-by: Jean Delvare jdelv...@suse.de Cc: David Airlie airl...@linux.ie Cc: Alex Deucher alexander.deuc...@amd.com --- This is only tested on a system where the Radeon device has no ACPI handle and there is no ATIF method. This should also be tested on systems with ATIF, presumably laptops. I think this makes sense. Reviewed-by: Alex Deucher alexander.deuc...@amd.com drivers/gpu/drm/radeon/radeon_acpi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) --- linux-3.2-rc3.orig/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:12:02.0 +0100 +++ linux-3.2-rc3/drivers/gpu/drm/radeon/radeon_acpi.c 2011-11-29 18:59:46.0 +0100 @@ -51,13 +51,13 @@ int radeon_acpi_init(struct radeon_devic acpi_handle handle; int ret; - /* No need to proceed if we're sure that ATIF is not supported */ - if (!ASIC_IS_AVIVO(rdev) || !rdev-bios) - return 0; - /* Get the device handle */ handle = DEVICE_ACPI_HANDLE(rdev-pdev-dev); + /* No need to proceed if we're sure that ATIF is not supported */ + if (!ASIC_IS_AVIVO(rdev) || !rdev-bios || !handle) + return 0; + /* Call the ATIF method */ ret = radeon_atif_call(handle); if (ret) -- Jean Delvare Suse L3 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel