Permission problem when trying to patch the kernel

Hello, my name is Rodrigo and I have a VAIO laptop. The problem with it is that it has soo many privative components that are very hard to get to work under Linux. Fortunately, I found a project http://code.google.com/p/vaio-f11-linux/, which aims to provide full suport to VAIOs in Linux.
In order to do this I had to patch the Kernel http://code.google.com/p/vaio-f11-linux … nelSupport
So I started to follow the instructions.
1) I downloaded from kernel.org the lastest stable release (2.6.39)
2) I made cd /usr/src/linux and unpacked the tar contnents from the kernel file into this directory
3) I made "sudo curl http://www.absence.it/vaio-acpi/source/ … 6.39.patch | patch p1" and I got this:
patching file include/linux/sonypi.h
patch: **** Can't rename file /tmp/poSN3DW6 to include/linux/sonypi.h : Permission denied
I don't know if I'm the problem or if the patch is "bad".I already submitted the problem to the Issues page from the project, but maybe I made something wrong, any help would be apreciated
Rodrigo

I don't think sudo was meant for strange things like downloading a patch and then piping it into the patch command. If you want that to work, you should either run "su" to make sure you are root beforehand, or split up the commands like so:
sudo curl http://www.absence.it/vaio-acpi/source/patches/vaio-2.6.39.patch >vaio-2.6.39.patch
sudo patch p1 <vaio-2.6.39.patch
The generic instructions for using this patch will probably work but it will be cleaner if you look at the wiki page for Arch's take on custom kernels.
Last edited by ConnorBehan (2011-05-25 03:15:06)

Similar Messages

  • Problems when trying to update the free version of Adobe Reader Updater 11.0.00 on Windows 8. There

    Problems when trying to update the free version of Adobe Reader Updater 11.0.00 on Windows 8. There is something to fix.??

    Have you tried http://ardownload.adobe.com/pub/adobe/reader/win/11.x/11.0.03/misc/AdbeRdrUpd11003.msp ?

  • Facing problem when trying to start the addon manually

    Hi,
    I have created an add-on using simple addon installer project. The prepared addon has been installed successfully. After installation, when trying to start the addon manually by Add-On Manager,
    The addon exe is giving an error message at the line when try to instantiate the SboGuiApi.
    "SAPbouiCOM.SboGuiApi SboGuiApi = new SAPbouiCOM.SboGuiApi();"
    The error message is -
    "Could not load file or assembly 'Interop.SAPbouiCOM, Version=6.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
    and finally it gives an error message "Add-On connection timed out".
    Note: At the development end we have tested it on our two systems its working properly. But on the production system its giving the error
    Please help!! its urgent...
    Regards,
    Ashok

    Hi suresh,
    I have tried it number of times, but the problem not been addressed yet.
    Or can you please clearify what exactly do you mean by UIAPI.
    What we have did at our end is -
    Just removed the SAPbouiCOM.dll from the references and add it again.
    "I am using SBO 2005A SP01 PL-31"
    If you have any more ideas please reply back
    Thanks for prompt response
    Regards,
    Ashok

  • Runtime :Javascript problem when trying to display the date binded to RFC

    Hi all,
    I am facing a very strange problem. I Have used a Bapi to pass some inputs to the Bapi function and binded the UI with that. But for the date field when i am running the application and trying to specify some date it is giving some Javascript Error and not Showing the date Dialog box
    The Error is "SAPUR_January is null or not an object"
    Is anyone has any idea on it, then please let me know at the earliest.
    Mukesh

    Hi armin and Mani
    For armin: I did't understand for what you are refering to.
    For Mani: Hi mani those are the Input fields and by default they are binded to the Date field only and user has to supply the date parameter. The Small box that comes when you bind a UI field with the Date type when i am clicking on that i am reciving that error.
    Mukesh Poddar

  • How can I solve the Error 110 problem when trying to modify the Description of Properties of PDF?

    Hello!
    I am trying to modify the Description of the PDF fies but I cannot do for some files because of the Error 110.  How can I solve this problem so I can succesfully modify the Description of the Properties of the PDF files?
    I also have one more question!
    Why is it impossible to modify the Description parts when the File name is missing in the Description?  There is a File name on each individual PDFs but some of them have to File names on the Description!
    Thank you very much in advance!

    Noelia, i have the same problem, did you solved it ?I had the same issue as Noelia when I investigated Noelia's issue originally (see the TwoVideos sample application in this thread: Re: How can I play different videos with only one MediaPlayer?
    I tried running the TwoVideos sample application today on Windows XPsp3, JavaFX 2.1b17, JDK7u4ea and I was unable to reproduce the problem, so it is likely fixed either 2.1 or (less likely I believe) a Windows 7 only related issue.
    http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html
    If you can reproduce the issue with the latest developer preview, then log a bug at http://javafx-jira.kenai.com with environment details, steps, sample media and code to reproduce the issue.
    Please contact me ainchilc at gmail dot com.If it is an answer to an unanswered question on a public forum, it is best to post the answer on the forum, then everybody who reads the forum will know what the answer is.

  • Authorisation problem when trying to see the data after loading

    HI Everyone,
                           I loaded data in quality. when i am trying to see the data, i am getting the following messages
    1.Your user master record is not sufficiently maintained for object Authorization Object for Plant
    2.System error: RSDRC / FORM AUTHORITY_CHECK USER NOT AUTHORIZED ZCOPC_C21 ZCOPC_C21
    3.System error: RSDRC / FUNC RSDRC_BASIC_CUBE_DATA_GET ERROR IN RSDRC_BASIC_QUERY_DATA_GET ZCOPC_C21 64
    4.System error: RSDRC / FORM DATA_GET ERROR IN RSDRC_BASIC_CUBE_DATA_GET ZCOPC_C21 64
    Can any one of you tell whether it is a transport issue or some authorisation problem. Guide me how to solve this.
    Thanks in advance for your help.

    Hi,
    After you get this error goto Tcode SU53 and then you'll get the object and activity for that auth object.
    You can then go and check if this is enabled in your auth profile using SUIM tcode and going to users.
    If its enabled then you need to check for values if you have authorization to display data for that particular plant.
    This is an auth issue and you should get approval from the appropriate person in order for you to look at the Master data and then have the Security or Basis team grant you access to the same.
    Cheers,
    Kedar

  • Problem when trying to install the Catalyst 8.2 on Satellite A200-1KB

    Hi,
    recently I did have to change back to Windows XP, since I was having problems running some old stuff that I have and I need to run it.
    The laptop has an ATI Mobility Radeon HD 2400, and I have installed the Windows XP 32 Professional, so I have downloaded the correct drivers but when im installing them I get an error that say or the driver isnt for my Windows or isnt for my Hardware aka Graphic Card :(
    Since I like games I would like to have the lasted driver install on the Laptop so I can play them whitout any problems, but I cant install the last driver for it.
    Thanks for your help in advance :D

    Hi friend,
    Ive read your post and one question about I am curios is: Where did youve downloaded the graphics driver? From the ATI homepage??
    If yes, then I can tell you: the drivers from there would NEVER work since you have a special mobile chipset and not a desktop graphics card.
    In such case (if you want to have the latest drivers) you will have to visit:
    http://www.laptopvideo2go.com
    or
    http://www.omegadrivers.net/
    because there and ONLY THERE you can get some modified drivers which will run on your mobile system. But install them on your own risk!!
    GReetings

  • Problems when trying to access the folio builder

    Hi I am not able to access my account by folio builder panel (Mac).
    When I click in the popp sig to enter my account information does not open.
    See what happens in the video: http://www.youtube.com/watch?v=9UgQ-YToObQ&feature=youtu.be
    Indesign Cs6
    Thank you.

    I've never seen that before. Here are a couple of things you can try.
    * Reset preferences while relaunching InDesign.
    * Quit InDesign and any other CS apps. Delete the opm.db file located in /Users/"your user name"/Library/Application Support/Adobe/OOBE/opm.db. (You might need to hold down Option and choose Go > Library in Finder if system files are hidden.) Then start InDesign and try signing in to the panel.

  • Permission Problem when trying to Installation Adobe Flash Player

    I'm having a problem installing the Adobe Flash Player in Windows 7 because I'm getting the now infamous message that there is not permission to install; however, mine is a bit different.
    I used to have Adobe Flash Player on my machine but it has disappeared, possibly inadvertently uninstalled.  Now, when I try to install the Flash Player, it appears to be almost done and then abruptly stops and gives the lack of permission message.  Note that I am NOT getting it installed and then it fails on a restart as most seems to do  ---  it won't install in the first place.
    Willing to try anything, I have downloaded and installed the subinacl.exe and the reset_fp.bat files in my Windows Resource Kits folder.  I try to run the reset_fp.bat file as Administrator (which I am) and the cursor changes to the hour glass and things are locked up.  I have to go to the Task Manager to end the process of Tools.
    Next, I can simply click on the reset_fp.bat file and it goes through the DOS looking screen with line of text running down like crazy but the bottom line after it stops says that the client does not have the proper permission.  Of course, that has not corrected my problem.  I do note that the first instruction in running that routine is "Install Adobe Flash Player" and that brings me back to my original problem  ---  I can't get Adobe Flash Player installed in the first place. .
    Anyone have any ideas  ---  I would be most appreciative.
    Jim B.

    Please try the offline installer:
    Internet Explorer:
    http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ax.exe
    Firefox and other NPAPI browsers:
    http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe
    If that doesn't work, make sure that your filesystem is in good shape:
    Check your hard disk for errors in Windows 7
    Then reboot the machine and try again. 
    If that doesn't work, please post your installer logs:
    Where do I find the Flash Player installation log on Windows?

  • Problems when trying to execute the jarfile

    I am facing a problem while executing a jar file.
    I have got a few .class files, when I run them in jbuilder , they run fine without any problems. Then I create a jar file using the jbuilder archive builder and try to run the jar file in dos prompt. It throws me an exception in one of my classes saying
    cannot instantiate class : com.evermind.server.rmi.RMIInitialContextFactory

    Hi,
    Could you please clarify on how you are trying to
    execute a jar file ? Do you mean that you do something
    like
         java <Classname> -cp <classpath>
    ? What do you do in your java program ? could you
    elaborate a little more ?
    Amlan.

  • Permission problems when trying to execute simple system command

    Hi, I am quite new to JSP so please forgive me if I ask really simple things... I am trying to run system commands on the server and display the output on a webpage. This is what I've got:
    <%@ page import="java.io.*" %>
    <HTML>
    <BODY>
    <%
        Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("/bin/ls");
    // for reading the output of the program
    // (out of the program is in for us)
    BufferedReader sOut = new BufferedReader(new
            InputStreamReader(p.getInputStream()));
    // read the output
    String line;
    while ((line = sOut.readLine()) != null)
            out.println("line<BR/>");
    %>
    </BODY>
    </HTML>However, when I run this, I get the following:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /research/test.jsp:7
    4: <%
    5: Runtime rt = Runtime.getRuntime();
    6:
    7: Process p = rt.exec("/bin/ls");
    8:
    9: // for reading the output of the program
    10: // (out of the program is in for us)
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    root cause
    java.security.AccessControlException: access denied (java.io.FilePermission /bin/ls execute)
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
    java.security.AccessController.checkPermission(AccessController.java:546)
    java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    java.lang.SecurityManager.checkExec(SecurityManager.java:779)
    java.lang.ProcessBuilder.start(ProcessBuilder.java:447)
    java.lang.Runtime.exec(Runtime.java:593)
    java.lang.Runtime.exec(Runtime.java:431)
    java.lang.Runtime.exec(Runtime.java:328)
    org.apache.jsp.research.test_jsp._jspService(test_jsp.java:49)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    Seems like it has something to do with the permissions granted to the JVM? I have googled high and low and still haven't found a way to solve it. I've also tried adding grant { permission java.io.FilePermission "file:/bin/ls", "execute"; } to my java.policy file but to no avail. Could somebody point out how to solve this? Thanks!

    I would think it is an OS permission thing rather than java permission
    What user is apache running as on this system?
    Does the user apache is running as have permissions to run these commands, in the directory where you are running them? Try executing them yourself when logged in as that user.
    I would also recommend you read the article [when runtime.exec() won't|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html].
    Cheers,
    evnafets

  • Problems when trying to surf the Internet through a SSL VPN tunnel

    Hi,
    I have a small/big problem, I have a customer who have the need for the possibility to surf the internet through the SA500W when they are connected through a SSL VPN tunnel in to their network. I am not using a Split Tunnel. What I have seen until now, when you run IPCONFIG/ALL the default gateway for the SSL VPN IP settings is 0.0.0.0. Is this the problem and if so, how can this be solved?
    Thanks in advance!
    Brg
    Niklas Eklov

    There are various causes for this error, see [[Firefox is already running but is not responding]] for details.

  • Permission problems when trying to play dvd's

    I'm using devfs and I made a symlink from /dev/cdroms/cdrom0 to /dev/dvd in the configfile. But when I pop in a dvd and hit play in xine, vlc, mplayer etc., I don't have permission to read it. It works if I "chmod a+r /dev/dvd", but this is only temporary and changes again if I reboot. I wondered if anyone could tell me how to make reading rights to /dev/dvd permanent as regular user?

    rottenikken
    I don't have permission to read it.
    first of all, login from a terminal as su -
    less /etc/fstab         and check the location of your dvd player.
    ie   /dev/cdroms/cdrom0     /mnt/dvd  udf   rw,user,noauto,unhide   0  0
    q quit    and then run xine , from the same root terminal.
    if you still get the "no permissions" fault , then its likely xine is pointing at
    the wrong place and is actually fouling itself.
    open up the setup panel (spanner) and under GUI tab set experience level to
    "Master of known universe".
    close and restart xine. go back to that panel to check its still set as Master.
    Now go to the [media] tab. Scroll down to the [device used for dvd playback]
    set this to /mnt/dvd  ( dont forget to check you actually have a directory called /mnt/dvd and if not, then make one).
    below this  in the [raw device  ...] set it as  /dev/cdroms/cdrom0  assuming thats whats in fstab file.
    Click the [Apply] and [Close] and close Xine.
    from the root (su - ) terminal
    mount /dev/cdroms/cdrom0 /mnt/dvd
    start xine again. Click the dvd button.
    If this works, then repeat that setup process  from a normal user terminal, or from the start menu u use to open programs.
    to use again u just have to mount the drive, from a root terminal, then use xine as a normal user.
    i choose to mount dvd and cds manually from a root terminal, but if all this has worked, and you want to automount, thats a different
    prob
    hth
    Kern

  • Problems when trying to replace the base table of an own Business Object

    Dear experts,
    some time ago we created two own (not inherited) Business Ojects for use
    in workflow scenarios. Now we came into the situation that for organizational
    reasons we wanted to exchange the base tables of both the objects.
    The fields and keys in the new tables are all the same than in the old ones,
    basically just the table names have changed.
    The frustrating result of trying to do so are two inconsitent Business objects
    that cannot be activated/generated any more with several errors that I cannot
    get rid off.
    Does anybody have experience with this kind of change in a BO ?
    Am I trying that in vain ? Do I have to create them both entirely new?
    Please help.
    Thanks in advance
    Andreas Flügel

    Hi Mike,
    thanks for the prompt answer.
    The first error is a syntax error concerning the unexpected end of a statement
    with "LIKE". It occurred in the following generated sourcecode-section after
    the generation and  it is generated this way again and again (I already tried
    to complete it manually according to the way it was before):
    BEGIN_DATA OBJECT. " Do not change.. DATA is generated
    " end of private,
      BEGIN OF KEY,
          JOURNALNUMBER LIKE /HOAG/P_DATJOURN-JOURNALNR,
      END OF KEY,
          _ LIKE.
    END_DATA OBJECT. " Do not change.. DATA is generated
    The second error points to the table name in the statement
    get_table_property /hoag/p_datjourn.
    saying "The table name /hoag/p_datjourn is implemented but not defined".
    The third error comes up with a popup (again and again and again) saying
    "The table is not implemented yet. Do you want a sourcecode sample to be
    created for the missing part?". I've alread answered that with "Yes" for a
    couple of times without anything being changed.
    Thanks
    Andreas
    P.S.: the messages may actually read a bit different in english because I just
    translated them myself from german but I hope you know them well enough to
    know what the system wants from me.

  • [SOLVED] How do I patch the kernel?

    EDIT (again): Doesn't seem like the patch is needed anymore. 3.3.1 kernel from the repos seems identical to my custom kernel (also 3.3.1).
    EDIT: The patches are for an older kernel but I was able to apply them manually.
    Hello. I'm trying to patch the kernel using the patch found on this page: http://lists.freedesktop.org/archives/i … 09584.html
    Now, I don't know much about patching but the patch in that post looks more like the program output of several diff commands. How do I format this to create a valid .patch file?
    Last edited by Splooshie123 (2012-04-10 04:52:40)

    To get back to my original question, making a patch out of what was in that mailing list post:
    Does this look ok?
    drivers/gpu/drm/i915/i915_drv.c | 4 ++++
    drivers/gpu/drm/i915/i915_drv.h | 1 +
    drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++++++++-------------
    3 files changed, 26 insertions(+), 13 deletions(-)
    diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
    index 004880aa3a948669b8b4e23d9ad73d132cff81d0..1d88f059a27321ecb681e2b7927bb69029fcb49a 100644
    --- a/drivers/gpu/drm/i915/i915_drv.c
    +++ b/drivers/gpu/drm/i915/i915_drv.c
    @@ -49,6 +49,10 @@ module_param_named(powersave, i915_powersave, int, 0600);
    unsigned int i915_lvds_fixed = 1;
    module_param_named(lvds_fixed, i915_lvds_fixed, int, 0600);
    +unsigned int i915_lvds_channels = 0;
    +module_param_named(lvds_channels, i915_lvds_channels, int, 0600);
    +MODULE_PARM_DESC(lvds_channels, "LVDS channels in use: 0=(default) probe hardware 1=single 2=dual");
    +
    unsigned int i915_lvds_downclock = 0;
    module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
    diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
    index 3fa8681459aa596e12e885568e5b48f0c9a60719..a6aab43e5f39f2d5b92a69a284bf8f72a254ea7c 100644
    --- a/drivers/gpu/drm/i915/i915_drv.h
    +++ b/drivers/gpu/drm/i915/i915_drv.h
    @@ -886,6 +886,7 @@ extern int i915_max_ioctl;
    extern unsigned int i915_fbpercrtc;
    extern unsigned int i915_powersave;
    extern unsigned int i915_lvds_fixed;
    +extern unsigned int i915_lvds_channels;
    extern unsigned int i915_lvds_downclock;
    extern unsigned int i915_lvds_24bit;
    diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
    index 09f57f29c30c371c213944be473090a780a287db..4dc91400edd8935be45a229cf91292339bca0ce8 100644
    --- a/drivers/gpu/drm/i915/intel_display.c
    +++ b/drivers/gpu/drm/i915/intel_display.c
    @@ -642,6 +642,20 @@ static const intel_limit_t intel_limits_ironlake_display_port = {
    .find_pll = intel_find_pll_ironlake_dp,
    +static int intel_is_dual_channel_mode(struct drm_crtc *crtc)
    +{
    + struct drm_device *dev = crtc->dev;
    + struct drm_i915_private *dev_priv = dev->dev_private;
    + if (i915_lvds_channels) {
    + /* User has specified desired channel mode */
    + return (i915_lvds_channels == 2);
    + }
    +
    + /* User has not specified mode so let's see
    + what the hardware is doing. */
    + return ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP);
    +}
    +
    static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    struct drm_device *dev = crtc->dev;
    @@ -653,8 +667,7 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    if (dev_priv->lvds_use_ssc && dev_priv->lvds_ssc_freq == 100)
    refclk = 100;
    - if ((I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP) {
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS dual channel */
    if (refclk == 100)
    limit = &intel_limits_ironlake_dual_lvds_100m;
    @@ -677,18 +690,16 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    static const intel_limit_t *intel_g4x_limit(struct drm_crtc *crtc)
    - struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    const intel_limit_t *limit;
    if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS with dual channel */
    limit = &intel_limits_g4x_dual_channel_lvds;
    - else
    - /* LVDS with dual channel */
    + } else {
    + /* LVDS with single channel */
    limit = &intel_limits_g4x_single_channel_lvds;
    + }
    } else if (intel_pipe_has_type(crtc, INTEL_OUTPUT_HDMI) ||
    intel_pipe_has_type(crtc, INTEL_OUTPUT_ANALOG)) {
    limit = &intel_limits_g4x_hdmi;
    @@ -821,8 +832,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    * reliably set up different single/dual channel state, if we
    * even can.
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;
    @@ -871,7 +881,6 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    int target, int refclk, intel_clock_t *best_clock)
    struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    intel_clock_t clock;
    int max_n;
    bool found;
    @@ -886,8 +895,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    lvds_reg = PCH_LVDS;
    else
    lvds_reg = LVDS;
    - if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;

Maybe you are looking for